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

rvm_path replace with rvm_use_path #438

Merged
merged 1 commit into from
Sep 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/support/outputs/rvm_use.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
echo\ "\-\-\-\-\->\ Using\ RVM\ environment\ \\\"123\\\"\"\s*if\ \[\[\ !\ \-s\ "\$HOME/\.rvm/scripts/rvm"\ \]\];\ then\s*echo\ "!\ Ruby\ Version\ Manager\ not\ found"\s*echo\ "!\ If\ RVM\ is\ installed,\ check\ your\ :rvm_path\ setting\."\s*exit 1\s*fi\s*source\ \$HOME/\.rvm/scripts/rvm\n\s*echo\ \"\-\-\-\-\-\>\ rvm\ use\ \\\"123\\\"\ \-\-create\"
echo\ "\-\-\-\-\->\ Using\ RVM\ environment\ \\\"123\\\"\"\s*if\ \[\[\ !\ \-s\ "\$HOME/\.rvm/scripts/rvm"\ \]\];\ then\s*echo\ "!\ Ruby\ Version\ Manager\ not\ found"\s*echo\ "!\ If\ RVM\ is\ installed,\ check\ your\ :rvm_use_path\ setting\."\s*exit 1\s*fi\s*source\ \$HOME/\.rvm/scripts/rvm\n\s*echo\ \"\-\-\-\-\-\>\ rvm\ use\ \\\"123\\\"\ \-\-create\"
14 changes: 7 additions & 7 deletions tasks/mina/rvm.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set :rvm_path, '$HOME/.rvm/scripts/rvm'
set :rvm_use_path, '$HOME/.rvm/scripts/rvm'

task :'rvm:use', :env do |_, args|
unless args[:env]
Expand All @@ -8,12 +8,12 @@
end

comment %{Using RVM environment \\\"#{args[:env]}\\\"}
command %{if [[ ! -s "#{fetch(:rvm_path)}" ]]; then
command %{if [[ ! -s "#{fetch(:rvm_use_path)}" ]]; then
echo "! Ruby Version Manager not found"
echo "! If RVM is installed, check your :rvm_path setting."
echo "! If RVM is installed, check your :rvm_use_path setting."
exit 1
fi}
command %{source #{fetch(:rvm_path)}}
command %{source #{fetch(:rvm_use_path)}}
comment %{rvm use \\"#{args[:env]}\\" --create}
end

Expand All @@ -25,11 +25,11 @@
end

comment %{creating RVM wrapper "#{args[:name]}_#{args[:bin]}" using \\"#{args[:env]}\\"}
command %{if [[ ! -s "#{fetch(:rvm_path)}" ]]; then
command %{if [[ ! -s "#{fetch(:rvm_use_path)}" ]]; then
echo "! Ruby Version Manager not found"
echo "! If RVM is installed, check your :rvm_path setting."
echo "! If RVM is installed, check your :rvm_use_path setting."
exit 1
fi}
command %{source #{fetch(:rvm_path)}}
command %{source #{fetch(:rvm_use_path)}}
command %{rvm wrapper #{args[:env]} #{args[:name]} #{args[:bin]} || exit 1}
end