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

Fix path of version script in environment #4117

Merged
merged 2 commits into from
Aug 7, 2017

Conversation

autopp
Copy link
Contributor

@autopp autopp commented Aug 4, 2017

Fixes #4072 .

Changes proposed in this pull request:

  • Source scripts/functions/version instead of scripts/version at scripts/environment

The modification of cc758aa seems to be insufficient.
When run source "/path/to/.rvm/scripts/rvm", the following warning will be output:

WARNING:
        Could not source '/path/to/.rvm/scripts/version' as file does not exist.
        RVM will likely not work as expected.

The warning will resolved by this patch.
I hope this helps.

@pkuczynski pkuczynski added this to the rvm-1.29.3 milestone Aug 4, 2017
@pkuczynski
Copy link
Member

Looks good! Could you please add an entry in the CHANGELOG?

@autopp autopp changed the title Fix path for source version script Fix path of version script in environment Aug 5, 2017
@autopp
Copy link
Contributor Author

autopp commented Aug 5, 2017

@pkuczynski Thank you for seeing this pull request. I updated CHANGELOG.

@pkuczynski pkuczynski merged commit a68b508 into rvm:master Aug 7, 2017
@pkuczynski
Copy link
Member

Thanks!

@autopp
Copy link
Contributor Author

autopp commented Aug 8, 2017

@pkuczynski Thanks for merge 👍

@autopp autopp deleted the fix_source_version_script branch August 8, 2017 02:23
@onediv
Copy link

onediv commented Aug 9, 2017

.rvm/scripts/rvm: line 171: __rvm_version_installed: command not found
.rvm/scripts/functions/cli: line 157: __rvm_version_installed: command not found
rvm by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]

-for script in functions/version functions/selector cd functions/cli cli override_gem
+for script in version functions/selector cd functions/cli cli override_gem

cat scripts/version
#!/usr/bin/env bash

__rvm_version_website()
{
echo "https://rvm.io"
}

__rvm_version_authors()
{
echo "Michal Papis, Piotr Kuczynski, Wayne E. Seguin"
}

__rvm_version_copyright()
{
echo "(c) 2009-2017 $(__rvm_version_authors)"
}

__rvm_print_headline()
{
rvm_log "Ruby enVironment Manager ${rvm_version} $(__rvm_version_copyright)
"
}

__rvm_version_remote()
{
__rvm_curl -s --max-time 10 https://github.com/rvm/rvm/raw/master/VERSION || true
}

__rvm_version_installed()
{
echo "$(\command \cat "$rvm_path/VERSION") ($(\command \cat "$rvm_path/RELEASE" 2>/dev/null))"
}

cat scripts/functions/version
#!/usr/bin/env bash

__rvm_version_website()
{
echo "https://rvm.io"
}

__rvm_version_authors()
{
echo "Michal Papis, Piotr Kuczynski, Wayne E. Seguin"
}

__rvm_version_copyright()
{
echo "(c) 2009-2017 $(__rvm_version_authors)"
}

__rvm_version()
{
echo "Ruby enVironment Manager ${rvm_version} $(__rvm_version_copyright)"
}

now it works
~/.rvm/bin $ ./rvm -v
Ruby enVironment Manager 1.29.2 (master) (c) 2009-2017 Michal Papis, Piotr Kuczynski, Wayne E. Seguin

please fix this issue...

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

Successfully merging this pull request may close these issues.

'scripts/version' file does not exist
3 participants