Add debug handler to print a stacktrace on Ctrl-C in debug mode.

This commit is contained in:
Todd Gamblin
2015-05-12 14:52:41 -07:00
parent c44db0133f
commit 095ff1cb4a
2 changed files with 56 additions and 0 deletions

View File

@@ -93,6 +93,10 @@ def main():
tty.set_debug(args.debug)
spack.debug = args.debug
if spack.debug:
import spack.util.debug as debug
debug.register_interrupt_handler()
spack.spack_working_dir = working_dir
if args.mock:
from spack.packages import PackageDB