don't crash if tzk is used without arguments

This commit is contained in:
Soren I. Bjornstad 2022-01-23 17:22:45 -06:00
parent 35ca2b896e
commit 4a6e4e7bc0
1 changed files with 1 additions and 0 deletions

View File

@ -385,6 +385,7 @@ def launch():
# go there before doing anything else.
if (not os.path.exists("tzk_config.py")
and os.environ.get('TZK_DIRECTORY')
and len(sys.argv) > 1
and sys.argv[1] != "init"): # we can't init an existing TZK_DIRECTORY
try:
os.chdir(os.environ['TZK_DIRECTORY'])