Skip to content

Commit

Permalink
Revert "Merge pull request #385 from takakuda/feature/conditions_change"
Browse files Browse the repository at this point in the history
This reverts commit 00e14aa, reversing
changes made to f796d36.

Reason: The pure Ruby doesn't have `Array#present?`. So this cause
`NoMethodError` when using dotenv without Rails.

```
$ dotenv -t .env
Traceback (most recent call last):
	3: from /bin/dotenv:23:in `<main>'
	2: from /bin/dotenv:23:in `load'
	1: from /lib/ruby/gems/2.5.0/gems/dotenv-2.7.3/bin/dotenv:4:in `<top (required)>'
/lib/ruby/gems/2.5.0/gems/dotenv-2.7.3/lib/dotenv/cli.rb:25:in `run': undefined method `present?' for []:Array (NoMethodError)
Did you mean?  prepend
```
  • Loading branch information
y-yagi committed Jun 24, 2019
1 parent f27e550 commit e2c0483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dotenv/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def run
rescue Errno::ENOENT => e
abort e.message
else
exec(*@argv) if @argv.present?
exec(*@argv) unless @argv.empty?
end
end

Expand Down

0 comments on commit e2c0483

Please sign in to comment.