We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1888f0d commit 7fba16bCopy full SHA for 7fba16b
setupbase.py
@@ -212,7 +212,12 @@ def run(cmd, **kwargs):
212
kwargs.setdefault('shell', os.name == 'nt')
213
if not isinstance(cmd, (list, tuple)) and os.name != 'nt':
214
cmd = shlex.split(cmd)
215
- cmd[0] = which(cmd[0])
+ cmd_path = which(cmd[0])
216
+ if not cmd_path:
217
+ sys.exit("Aborting. Could not find cmd (%s) in path. "
218
+ "If command is not expected to be in user's path, "
219
+ "use an absolute path." % cmd[0])
220
+ cmd[0] = cmd_path
221
return subprocess.check_call(cmd, **kwargs)
222
223
0 commit comments