Fix command normalization when a custom env is passed

This commit is contained in:
taoufik07 2023-01-05 13:31:28 +01:00 committed by Anthony Sottile
parent 0dbc154380
commit bf1a1fa5fd
5 changed files with 35 additions and 27 deletions

View file

@ -99,7 +99,7 @@ def cmd_output_b(
_setdefault_kwargs(kwargs)
try:
cmd = parse_shebang.normalize_cmd(cmd)
cmd = parse_shebang.normalize_cmd(cmd, env=kwargs.get('env'))
except parse_shebang.ExecutableNotFoundError as e:
returncode, stdout_b, stderr_b = e.to_output()
else: