From 4a6e4e7bc0c0cc4d7858e03a4009147509e80a66 Mon Sep 17 00:00:00 2001 From: "Soren I. Bjornstad" Date: Sun, 23 Jan 2022 17:22:45 -0600 Subject: [PATCH] don't crash if tzk is used without arguments --- tzk/__main__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tzk/__main__.py b/tzk/__main__.py index bd334a9..2f7b167 100644 --- a/tzk/__main__.py +++ b/tzk/__main__.py @@ -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'])