From 7674bf2ad4e3f993b87a68e421ba5b19b5e6ec74 Mon Sep 17 00:00:00 2001 From: murthysrd Date: Sun, 11 Dec 2022 09:30:23 -0800 Subject: [PATCH] clone packs into user_home/.st2packs directory Openshift does not allow packs to be cloned to home directory as they are mounted at `/`. Proposing to use a directory `.st2packs` in home directory. --- CHANGELOG.rst | 1 + st2common/st2common/util/pack_management.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a5868c756a..c2ae5ad0ed 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ in development Added ~~~~~ +* Move `git clone` to `user_home/.st2packs` #5845 * Error on `st2ctl status` when running in Kubernetes. #5851 Contributed by @mamercad diff --git a/st2common/st2common/util/pack_management.py b/st2common/st2common/util/pack_management.py index 12d0251e00..ae3c256184 100644 --- a/st2common/st2common/util/pack_management.py +++ b/st2common/st2common/util/pack_management.py @@ -129,7 +129,7 @@ def download_pack( with lock_file: try: user_home = os.path.expanduser("~") - abs_local_path = os.path.join(user_home, temp_dir_name) + abs_local_path = os.path.join(user_home, ".st2packs", temp_dir_name) if pack_url.startswith("file://"): # Local pack