mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
separate command from arguments to avoid problems when adding quotes
This commit is contained in:
parent
d8f1cffd10
commit
748d2ebc0a
@ -52,8 +52,8 @@ def _rvm(command, arguments=None, runas=None, cwd=None):
|
||||
|
||||
|
||||
def _rvm_do(ruby, command, runas=None, cwd=None):
|
||||
return _rvm('{ruby} do {command}'.
|
||||
format(ruby=ruby or 'default', command=command),
|
||||
return _rvm('{ruby}'.format(ruby=ruby or 'default'),
|
||||
arguments='do {command}'.format(command=command),
|
||||
runas=runas, cwd=cwd)
|
||||
|
||||
|
||||
@ -120,8 +120,8 @@ def install_ruby(ruby, runas=None):
|
||||
# libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev
|
||||
# libncurses5-dev automake libtool bison subversion ruby
|
||||
if runas and runas != 'root':
|
||||
_rvm('autolibs disable', ruby, runas=runas)
|
||||
return _rvm('install --disable-binary', ruby, runas=runas)
|
||||
_rvm('autolibs', 'disable {ruby}'.format(ruby=ruby), runas=runas)
|
||||
return _rvm('install', '--disable-binary {ruby}'.format(ruby=ruby), runas=runas)
|
||||
else:
|
||||
return _rvm('install', ruby, runas=runas)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user