summaryrefslogtreecommitdiff
path: root/client/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/main.py')
-rwxr-xr-xclient/main.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/client/main.py b/client/main.py
index d57acd7..7167c95 100755
--- a/client/main.py
+++ b/client/main.py
@@ -2,10 +2,16 @@
# -*- coding: utf-8-*-
import os
+import sys
import shutil
# Change CWD to $JASPER_HOME/jasper/client
-os.chdir(os.path.join(os.getenv("JASPER_HOME"), "jasper", "client"))
+jasper_home = os.getenv("JASPER_HOME")
+if not jasper_home or not os.path.exists(jasper_home):
+ print("Error: $JASPER_HOME is not set.")
+ sys.exit(0)
+
+os.chdir(os.path.join(jasper_home, "jasper", "client"))
old_client = os.path.abspath(os.path.join(os.pardir, "old_client"))
if os.path.exists(old_client):