From 72a62012d5c508beed313cad4e1178fc138e3b2c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 08:33:50 +0530 Subject: [PATCH] added checks for running husky install during post install (#1000) (#1021) (cherry picked from commit d3aced1939cbe77b18dff3c97b3a67444a206188) Signed-off-by: Amardeepsingh Siglani Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a3a52f76..ae08d5f3a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "test:jest:update-snapshots": "yarn run test:jest -u", "build": "yarn plugin-helpers build", "postbuild": "echo Renaming build artifact to [$npm_package_config_zip_name-$npm_package_version.zip] && mv build/$npm_package_config_id*.zip build/$npm_package_config_zip_name-$npm_package_version.zip", - "postinstall": "husky install" + "postinstall": "node -e \"const { execSync } = require('child_process');const { INIT_CWD, PWD = process.cwd() } = process.env; if (INIT_CWD?.startsWith?.(PWD)) {try {execSync('husky install');} catch (e) {}}\"" }, "resolutions": { "@types/react": "^16.9.8",