Skip to content

Commit

Permalink
Don't install panic handler when RUST_BACKTRACE=1 (pantsbuild#5561)
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion authored Mar 7, 2018
1 parent e1cd9d4 commit 5892fb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/python/pants/engine/native.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,4 +729,7 @@ def tc(constraint):
return self.gc(scheduler, self.lib.scheduler_destroy)

def set_panic_handler(self):
self.lib.set_panic_handler()
if os.getenv("RUST_BACKTRACE", "0") != "1":
# The panic handler hides a lot of rust tracing which may be useful.
# Don't activate it when the user explicitly asks for rust backtraces.
self.lib.set_panic_handler()

0 comments on commit 5892fb3

Please sign in to comment.