Skip to content

Commit

Permalink
Merge pull request #338 from DSD-DBS/append-etc-environment
Browse files Browse the repository at this point in the history
Append to `/etc/environment` instead of overwriting it
  • Loading branch information
MoritzWeber0 authored Nov 1, 2024
2 parents c7c5dd6 + c2c4087 commit 0ec50cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions capella/setup/provisioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,8 @@ def provide_project_dirs_to_capella_plugin(
projects: list[_ProjectDict],
) -> None:
locations = ":".join([str(project["location"]) for project in projects])
pathlib.Path("/etc/environment").write_text(
f"export MODEL_INBOX_DIRECTORIES={locations}\n", encoding="utf-8"
)
with open("/etc/environment", "a", encoding="utf-8") as f:
f.write(f"export MODEL_INBOX_DIRECTORIES={locations}\n")
log.info(
"Set environment variable MODEL_INBOX_DIRECTORIES to '%s'", locations
)
Expand Down

0 comments on commit 0ec50cd

Please sign in to comment.