diff --git a/versions.py b/versions.py index 63877602..026da81a 100644 --- a/versions.py +++ b/versions.py @@ -149,7 +149,10 @@ def main(): print(f"Versions written to {versions_path}") # copy versions.json to server - versions_config_path = os.environ['VERSIONS_CONFIG_PATH'] + versions_config_path = os.environ.get('VERSIONS_CONFIG_PATH') + if not versions_config_path: + print("VERSIONS_CONFIG_PATH is not set") + exit(1) ret = os.system(f'scp {versions_path} {versions_config_path}') if ret != 0: print(f'Failed to copy versions.json to server')