diff --git a/lib/galaxy/tool_util/deps/mulled/invfile.lua b/lib/galaxy/tool_util/deps/mulled/invfile.lua index 25b2c7b07592..fdacf4740ae2 100644 --- a/lib/galaxy/tool_util/deps/mulled/invfile.lua +++ b/lib/galaxy/tool_util/deps/mulled/invfile.lua @@ -72,8 +72,14 @@ else end local preinstall = VAR.PREINSTALL +if preinstall ~= '' then + preinstall = preinstall .. ' && ' +end local postinstall = VAR.POSTINSTALL +if postinstall ~= '' then + postinstall = '&&' .. postinstall +end inv.task('build') .using(conda_image) @@ -81,11 +87,14 @@ inv.task('build') .run('rm', '-rf', '/data/dist') .using(conda_image) .withHostConfig({binds = bind_args}) - .run('/bin/sh', '-c', preinstall) - .run('/bin/sh', '-c', conda_bin .. ' create --quiet --yes -p /usr/local/env --copy') - .run('/bin/sh', '-c', conda_bin .. ' install ' .. channel_args .. ' ' .. target_args - .. ' --strict-channel-priority -p /usr/local/env --copy --yes ' .. verbose) - .run('/bin/sh', '-c', postinstall) + .run('/bin/sh', '-c', preinstall + .. conda_bin .. ' create --quiet --yes -p /usr/local/env --copy && ' + .. conda_bin .. ' install ' + .. channel_args .. ' ' + .. target_args + .. ' --strict-channel-priority -p /usr/local/env --copy --yes ' + .. verbose + .. postinstall) .wrap('build/dist/env') .at('/usr/local') .inImage(destination_base_image)