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

Output correct environment path. #3483

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bronzdoc
Copy link

@bronzdoc bronzdoc commented Aug 8, 2015

Pull requets to fix the "'env' command doesn't operate as expected #3465" issue

@bronzdoc
Copy link
Author

bronzdoc commented Aug 8, 2015

The build is failing here:

rvm env 2.1.1 -- --path
rvm: Environment --path not found.
failed: match = /2.1.1/
failed: match = /environments/

i noticed that the way the command is being tested is not as the one explained in the documentation of rvm. https://rvm.io/deployment/cron#loading-rvm-environment-files-in-shell-script

to fix this i need to know what is the correct way to execute the command, thanks.

@@ -272,7 +272,26 @@ __rvm_env_print()
if
[[ "$rvm_path_flag" == "1" || "$*" == *"--path"* ]]
then
echo "$environment_file_path"
if
[[ ! -z "$@" ]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-n is a tad more concise than ! -z for the string-isn't-null test.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right @havenwood thanks, i will update it.

@@ -656,6 +656,7 @@ __rvm_parse_args()
rvm_token=${rvm_token#--}
rvm_token=${rvm_token//-/_}
export "rvm_${rvm_token}_flag"=1
rvm_ruby_args+=($next_token);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not look good, the options here do not take arguments and next_token is what's listed after them, could be anything

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

Successfully merging this pull request may close these issues.

None yet

3 participants