From 12ca3fe214c5c44e03151c1f106851c0a435cd5f Mon Sep 17 00:00:00 2001 From: Agent Date: Tue, 7 Apr 2026 00:13:26 +0000 Subject: [PATCH] fix: release.sh: cd in disinto_release() permanently changes CWD of calling shell (#323) --- lib/release.sh | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/release.sh b/lib/release.sh index 33a01e2..6eb03ee 100644 --- a/lib/release.sh +++ b/lib/release.sh @@ -118,20 +118,22 @@ This PR creates a vault item for the release of version ${version}. " # Create branch from clean primary branch - cd "$ops_root" - git checkout "$PRIMARY_BRANCH" - git pull origin "$PRIMARY_BRANCH" - git checkout -B "$branch_name" "$PRIMARY_BRANCH" + ( + cd "$ops_root" + git checkout "$PRIMARY_BRANCH" + git pull origin "$PRIMARY_BRANCH" + git checkout -B "$branch_name" "$PRIMARY_BRANCH" - # Add and commit only the vault TOML file - git add "vault/actions/${id}.toml" - git commit -m "$pr_title" -m "$pr_body" 2>/dev/null || true + # Add and commit only the vault TOML file + git add "vault/actions/${id}.toml" + git commit -m "$pr_title" -m "$pr_body" 2>/dev/null || true - # Push branch - git push -u origin "$branch_name" 2>/dev/null || { - echo "Error: failed to push branch" >&2 - exit 1 - } + # Push branch + git push -u origin "$branch_name" 2>/dev/null || { + echo "Error: failed to push branch" >&2 + exit 1 + } + ) # Create PR local pr_response