separate command from arguments to avoid problems when adding quotes

This commit is contained in:
Alexander Schwartz 2015-03-14 19:47:19 +01:00
parent d8f1cffd10
commit 748d2ebc0a

View File

@ -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)