# HG changeset patch # User John W. Eaton # Date 1711167386 14400 # Node ID 7f3b5857f56983fc7cdf068f7d17dc3256e48d30 # Parent 10c1848313c6d628f3494bcbdc3fcef4c861593d EnvShellCommand: fix construction of command for ShellCommand parent class diff -r 10c1848313c6 -r 7f3b5857f569 master.cfg --- a/master.cfg Fri Mar 22 16:20:13 2024 -0400 +++ b/master.cfg Sat Mar 23 00:16:26 2024 -0400 @@ -269,9 +269,12 @@ class EnvShellCommand (ShellCommand): def __init__ (self, command = '', **kwargs): - kwargs['command'] = [ - 'bash', '-c', 'if [ -f "$HOME/buildbot-worker-env" ]; then source "$HOME/buildbot-worker-env"; else echo "$HOME/buildbot-worker-env not found"; fi; %s' % command - ] + shell_cmd = 'if [ -f "$HOME/buildbot-worker-env" ]; then source "$HOME/buildbot-worker-env"; else echo "$HOME/buildbot-worker-env not found"; fi; ' + if isinstance (command, list): + shell_cmd += ' '.join (command) + else: + shell_cmd += command + kwargs['command'] = ['bash', '-c', shell_cmd] ShellCommand.__init__ (self, **kwargs) ## Steps we may use in more than one build factory.