Skip to content

Commit c6a6d3a

Browse files
csandmanclaude
andauthored
fix(publish): Pack tarball with --ignore-scripts (#416)
Removing .npmrc's ignore-scripts=true in #413 had an unintended consequence: `npm pack` now runs the project's own `prepare` script (husky), which dumps lifecycle output to stdout. With TARBALL=$(npm pack), that output gets captured alongside the tarball filename, producing a multi-line value that breaks $GITHUB_OUTPUT's key=value\n format and fails the build job. pnpm's `allowBuilds` whitelist only gates *dependency* install scripts; it doesn't suppress the project's own scripts during `npm pack`. Adding --ignore-scripts to the pack invocation restores clean stdout. Husky's `prepare` doesn't need to run during CI pack anyway — git hooks aren't relevant in the ephemeral runner. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 40c23e3 commit c6a6d3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
- name: Pack tarball
8383
id: pack
8484
run: |
85-
TARBALL=$(npm pack)
85+
TARBALL=$(npm pack --ignore-scripts)
8686
echo "tarball=$TARBALL" >> "$GITHUB_OUTPUT"
8787
8888
- name: Upload tarball artifact

0 commit comments

Comments
 (0)