diff options
author | behlec <33778676+behlec@users.noreply.github.com> | 2017-12-07 20:31:24 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-07 21:31:24 +0200 |
commit | 5992ab1c721d82b90af0e26c7a907f196bcf8dd1 (patch) | |
tree | 885e1c4cf5a8bb78016cc1726a2f5d68c9db9c79 | |
parent | 4ae0cadb7f951691e2913a660a61d024d04b5485 (diff) | |
download | meson-5992ab1c721d82b90af0e26c7a907f196bcf8dd1.zip meson-5992ab1c721d82b90af0e26c7a907f196bcf8dd1.tar.gz meson-5992ab1c721d82b90af0e26c7a907f196bcf8dd1.tar.bz2 |
Improve error handling when failing to execute program. (#2743)
-rw-r--r-- | mesonbuild/scripts/commandrunner.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/scripts/commandrunner.py b/mesonbuild/scripts/commandrunner.py index f99cddb..fdca7cd 100644 --- a/mesonbuild/scripts/commandrunner.py +++ b/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): |