Skip to content

Commit 40c978c

Browse files
eli-schwartznirbheek
authored andcommitted
do not report context on python traceback, for PermissionError
It's not a MesonBug which needs to be reported, and the existing error already adequately points out the problematic file. It is impossible to get a PermissionError for files created by meson itself, once the build directory has been created, anyway.
1 parent 7e04d7f commit 40c978c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mesonbuild/mesonmain.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ def run(self, args):
152152
if os.environ.get('MESON_FORCE_BACKTRACE'):
153153
raise
154154
return 1
155+
except PermissionError:
156+
if os.environ.get('MESON_FORCE_BACKTRACE'):
157+
raise
158+
traceback.print_exc()
159+
return 2
155160
except Exception as e:
156161
if os.environ.get('MESON_FORCE_BACKTRACE'):
157162
raise

0 commit comments

Comments
 (0)