Improve error handling when failing to execute program. (#2743)

pull/2749/head
behlec 7 years ago committed by Jussi Pakkanen
parent 4ae0cadb7f
commit 5992ab1c72
  1. 5
      mesonbuild/scripts/commandrunner.py

@ -38,7 +38,10 @@ def run_command(source_dir, build_dir, subdir, meson_command, command, arguments
try:
return subprocess.Popen(command_array, env=child_env, cwd=cwd)
except FileNotFoundError:
print('Could not execute command "%s".' % command)
print('Could not execute command "%s". File not found.' % command)
sys.exit(1)
except PermissionError:
print('Could not execute command "%s". File not executable.' % command)
sys.exit(1)
def run(args):

Loading…
Cancel
Save