Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions easybuild/tools/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,17 +454,20 @@ def to_cmd_str(cmd):
cmd_name = fileprefix_from_cmd(os.path.basename(cmd_str.split(' ')[0]))
tmpdir = tempfile.mkdtemp(dir=toptmpdir, prefix=f'{cmd_name}-')

_log.info(f'run_shell_cmd: command environment of "{cmd_str}" will be saved to {tmpdir}')

cmd_out_fp = os.path.join(tmpdir, 'out.txt')
_log.info(f'run_shell_cmd: Output of "{cmd_str}" will be logged to {cmd_out_fp}')
if split_stderr:
cmd_err_fp = os.path.join(tmpdir, 'err.txt')
_log.info(f'run_shell_cmd: Errors and warnings of "{cmd_str}" will be logged to {cmd_err_fp}')
else:
cmd_err_fp = None

cmd_sh = create_cmd_scripts(cmd_str, work_dir, env, tmpdir, cmd_out_fp, cmd_err_fp)

log_str = f'Command environment of\n\t"{cmd_str}"\nwill be saved to {cmd_sh}\n'
log_str += f'Output will be logged to {cmd_out_fp}'
if cmd_err_fp:
log_str += f'\nErrors and warnings will be logged to {cmd_err_fp}'
_log.info(f'run_shell_cmd: {log_str}')

else:
tmpdir, cmd_out_fp, cmd_err_fp, cmd_sh = None, None, None, None

Expand Down