Skip to content

Commit e6b3456

Browse files
authored
release: use subshells to preserve working directory (#254)
Each cd command was affecting subsequent commands. After the first cd release/platforms, the second cd release/platforms tried to enter a non-existent subdirectory. Wrap each cd in a subshell to isolate working directory changes.
1 parent bac7a7d commit e6b3456

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ release:
219219
LUA_PATH="lib/home/?.lua;;" ./release/cosmic-lua lib/home/gen-platforms.lua \
220220
release/platforms "$$base_url" "$$tag" \
221221
release/home-darwin-arm64 release/home-linux-arm64 release/home-linux-x86_64; \
222-
cd release/platforms && ../../artifacts/cosmos-zip/zip -j ../home platforms.lua; \
223-
cd release/platforms && ../../artifacts/cosmos-zip/zip -r ../home manifests; \
224-
cd release && sha256sum home home-* cosmic-lua > SHA256SUMS && cat SHA256SUMS; \
222+
(cd release/platforms && ../../artifacts/cosmos-zip/zip -j ../home platforms.lua); \
223+
(cd release/platforms && ../../artifacts/cosmos-zip/zip -r ../home manifests); \
224+
(cd release && sha256sum home home-* cosmic-lua > SHA256SUMS && cat SHA256SUMS); \
225225
gh release create "$$tag" \
226226
$${PRERELEASE_FLAG} \
227227
--title "home $$tag" \

0 commit comments

Comments
 (0)