allow export line

some people want to declare vars and then export them like this:

SOME=thing
export SOME

this pull request will allow that and even validate that the var is set
I guess it could go both ways. I can't think of a situation where an export
wouldn't be a mistake, so I'd be inclined to keep the exception raising in
place.
On Dec 22, 2014 7:36 AM, "Brandon Keepers" <notifications@github.com> wrote:

> In lib/dotenv/parser.rb
> <https://github.com/bkeepers/dotenv/pull/153#discussion-diff-22165900>:
>
> > @@ -55,6 +55,9 @@ def call
> >            end
> >
> >            hash[key] = value
> > +        elsif line.split.first == 'export'
> > +          # looks like you want to export after declaration, I guess that is ok
> > +          raise FormatError, "Line #{line.inspect} has a variable that is not set" unless line.split[1..-1].all?{ |var| hash.member?(var) }
>
> sh does not complain if you export a variable that is not defined. Should
> we mimic that behavior?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bkeepers/dotenv/pull/153/files#r22165900>.
>