Skip to content

Commit 695dbd9

Browse files
bugerclaude
andcommitted
fix: make postinstall script conditional for patch-package
Only run patch-package if it exists (dev environment). End users installing the published package don't have patch-package, so the script should gracefully skip. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 53df4f4 commit 695dbd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"pretest": "node scripts/generate-config-schema.js && npm run build:cli",
4949
"test:with-build": "npm run build:cli && jest",
5050
"test:yaml": "node dist/index.js test --progress compact",
51-
"postinstall": "patch-package",
51+
"postinstall": "[ -f node_modules/.bin/patch-package ] && patch-package || true",
5252
"prepare": "husky",
5353
"pre-commit": "lint-staged",
5454
"deploy:site": "cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true",

0 commit comments

Comments
 (0)