Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in 2.7.1: Ignores quote in arguments #381

Closed
walro opened this issue Mar 22, 2019 · 5 comments
Closed

Regression in 2.7.1: Ignores quote in arguments #381

walro opened this issue Mar 22, 2019 · 5 comments
Assignees

Comments

@walro
Copy link

walro commented Mar 22, 2019

As the title of the issue, it seems like quotes are ignored. Looking at v2.7.0...v2.7.1 it would seem like this was an inadvertent effect of #376

Steps to reproduce

$ gem install dotenv
Fetching dotenv-2.7.1.gem
Successfully installed dotenv-2.7.1
Parsing documentation for dotenv-2.7.1
Installing ri documentation for dotenv-2.7.1
Done installing documentation for dotenv after 0 seconds
1 gem installed

$ cat dotenv.sh 
#!/bin/sh

echo $1

$ dotenv ./dotenv.sh "dotenv envdot"
dotenv

$ gem uninstall dotenv -v 2.7.1
Successfully uninstalled dotenv-2.7.1

$ gem install dotenv -v 2.7.0
Fetching dotenv-2.7.0.gem
Successfully installed dotenv-2.7.0
Parsing documentation for dotenv-2.7.0
Installing ri documentation for dotenv-2.7.0
Done installing documentation for dotenv after 0 seconds
1 gem installed

$ dotenv ./dotenv.sh "dotenv envdot"
dotenv envdot

Expected behavior

It should keep quoted argument as a single argument, as in previous versions of dotenv.

Actual behavior

It seems to split quoted arguments on space, ignoring the quotes.

System configuration

dotenv version: 2.7.1

Rails version: n/a

Ruby version: 2.6.1

@cadwallion cadwallion self-assigned this Mar 22, 2019
@cadwallion
Copy link
Collaborator

Thank you for reporting! I'll investigate this issue today and get back to you as soon as I can.

@cadwallion
Copy link
Collaborator

@walro Could you please provide the dotenv.sh script you were using to test in the repro steps? I'd like to be as consistent as possible. Thanks!

@dentarg
Copy link

dentarg commented Mar 22, 2019

@cadwallion it is there, it is really short:

#!/bin/sh

echo $1

@cadwallion
Copy link
Collaborator

Oh, apologies. Thanks!

@cadwallion
Copy link
Collaborator

Thank you so much for the clear and concise report! #382 should resolve the issue (and also dramatically improved the maintainability of the CLI) for you. I'll cut a 2.7.2 gem in the next 24 hours as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants