From 0f97184abb438d2362994060937204fa95c07c66 Mon Sep 17 00:00:00 2001 From: rishwanth1995 <rishwanthsenthilkumar@hotmail.com> Date: Mon, 16 Apr 2018 09:48:01 -0400 Subject: [PATCH] exit when env not found --- appveyor.yml | 1 + setupLibs.py | 5 +++-- win32/updateBuildLibs.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b3e62b24b..a00843bc1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,6 +25,7 @@ environment: LIBEWF_HOME: "C:\\libewf_64bit" POSTGRESQL_HOME_64: "C:\\Program Files\\PostgreSQL\\9.5" PYTHON: "C:\\Python36-x64" + JDK_HOME: C:\Program Files\Java\jdk1.8.0 services: - postgresql95; diff --git a/setupLibs.py b/setupLibs.py index e11adf346..da58702b8 100644 --- a/setupLibs.py +++ b/setupLibs.py @@ -39,17 +39,18 @@ def main(): base_Library_path["libewf_64bit"] = os.path.dirname(libewf_home) else: print('Please set the env variable LIBEWF_HOME') + sys.exit(1) if(libvhdi_home != None): base_Library_path["libvhdi_64bit"] = os.path.dirname(libvhdi_home) else: print('Please set the env variable LIBVHDI_HOME') - + sys.exit(1) if(libvmdk_home != None): base_Library_path["libvmdk_64bit"] = os.path.dirname(os.path.dirname(libvmdk_home)) else: print('Please set the env variable LIBVMDK_HOME') - + sys.exit(1) setupLibrary(base_Library_path); diff --git a/win32/updateBuildLibs.py b/win32/updateBuildLibs.py index 8c083b3a4..9a04d61a2 100644 --- a/win32/updateBuildLibs.py +++ b/win32/updateBuildLibs.py @@ -213,6 +213,7 @@ def buildTSK(wPlatform, target): if not TSK_HOME: print("Please set the TSK_HOME environment variable") + sys.exit(1) else: os.chdir(os.path.join(os.getenv("TSK_HOME"),"win32")) -- GitLab