Intentionally crash if not running inside tmux
This commit is contained in:
parent
6963d2ae71
commit
0cbc858cf4
1 changed files with 8 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
import atexit
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import platform
|
||||
import time
|
||||
|
|
@ -233,6 +234,13 @@ def keyboard_test():
|
|||
def main():
|
||||
"""Main function for hardware diagnostics."""
|
||||
args = docopt(DOCSTRING)
|
||||
|
||||
# Safety check
|
||||
if 'TMUX' not in os.environ:
|
||||
LOG.error('tmux session not found')
|
||||
raise RuntimeError('tmux session not found')
|
||||
|
||||
# Init
|
||||
menu = build_menu(args['--quick'])
|
||||
state = State()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue