Skip to content

Commit fead4e4

Browse files
Ensure environment variable always contains an absolute path
1 parent 9956454 commit fead4e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/deployment/presto-clp/scripts/generate-user-env-vars-file.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ def _add_clp_env_vars(clp_package_dir: Path, env_vars: Dict[str, str]) -> bool:
111111
"archive_output.storage.directory",
112112
str(clp_package_dir / "var" / "data" / "archives"),
113113
)
114-
env_vars["CLP_ARCHIVES_DIR"] = clp_archives_dir
114+
115+
if Path(clp_archives_dir).is_absolute():
116+
env_vars["CLP_ARCHIVES_DIR"] = clp_archives_dir
117+
else:
118+
env_vars["CLP_ARCHIVES_DIR"] = str(clp_package_dir / clp_archives_dir)
115119

116120
credentials_file_path = clp_package_dir / "etc" / "credentials.yml"
117121
if not credentials_file_path.exists():

0 commit comments

Comments
 (0)