Skip to content

Commit 6184bfe

Browse files
committed
fix(installer): ignore archive ownership on extraction
Signed-off-by: xz-dev <xiangzhedev@gmail.com>
1 parent f7d422d commit 6184bfe

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎install.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ echo "Extracting..."
225225
if [ "$EXT" = "zip" ]; then
226226
unzip -q "$DLDIR/$ARCHIVE" -d "$DLDIR"
227227
else
228-
tar -xzf "$DLDIR/$ARCHIVE" -C "$DLDIR"
228+
tar --no-same-owner -xzf "$DLDIR/$ARCHIVE" -C "$DLDIR"
229229
fi
230230

231231
DLBIN="$DLDIR/codebase-memory-mcp"

‎tests/test_smoke_fixture_contract.sh‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ for relative, source in (
137137
# Unix fixtures mirror the release archive surface and Linux update aliases.
138138
for name in ("LICENSE", "install.sh", "THIRD_PARTY_NOTICES.md"):
139139
require(name in smoke_local, f"smoke-local.sh archive must include {name}")
140+
install_script = read("install.sh")
141+
require(
142+
'tar --no-same-owner -xzf "$DLDIR/$ARCHIVE" -C "$DLDIR"' in install_script,
143+
"install.sh must not preserve release-builder ownership when extracting tar archives",
144+
)
140145
# One composition ships, so there is one archive name and no variant alias.
141146
require(
142147
"codebase-memory-mcp-${OS}-${ARCH}.tar.gz" in smoke_local

0 commit comments

Comments
 (0)