@@ 7,7 7,7 @@ from djeploy import djeploy_require, get
def set_environment(variable, value):
set_env_cmd = 'setenv' if 'csh' in env.shell.split()[0] else 'export'
extra = ' ' if set_env_cmd == 'setenv' else '='
- return '%s %s%s\'%s\' && ' % (set_env_cmd, variable, extra, value)
+ return '%s %s%s"%s" && ' % (set_env_cmd, variable, extra, value)
def get_user_home(name):
@@ 104,11 104,11 @@ def remove_user(name):
@task
def check_command_output(cmd, pattern, use_sudo=False, **kwargs):
- ''' Check the output of a command (cmd) using regular expression
- defined in pattern. Pattern can be a list of several regexp
+ ''' Check the output of a command (cmd) using regular expression
+ defined in pattern. Pattern can be a list of several regexp
patterns and each one will be validated.
- If all pass, then None is returned. Otherwise, the output
+ If all pass, then None is returned. Otherwise, the output
with the unmatched pattern is given in a tuple format.
'''
use_command = 'sudo' if use_sudo else 'run'