Skip to content

Commit

Permalink
Fix up interaction between envvars expansion and abspath in bps yaml …
Browse files Browse the repository at this point in the history
…config writing
  • Loading branch information
eacharles committed Sep 5, 2024
1 parent 1ab11a3 commit a6dc929
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lsst/cmservice/handlers/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ async def _write_script(
include_configs = []
for to_include_ in [bps_wms_yaml_file, bps_wms_clustering_file, bps_wms_resources_file]:
if to_include_:
include_configs.append(os.path.expandvars(to_include_))
# We want abspaths, but we need to be careful about
# envvars that are not yet expanded
to_include_ = os.path.expandvars(to_include_)
if "$" not in to_include_:
to_include_ = os.path.abspath(to_include_)
include_configs.append(to_include_)
include_configs += bps_wms_extra_files

workflow_config["includeConfigs"] = include_configs
Expand Down

0 comments on commit a6dc929

Please sign in to comment.