From 634c393d3528c37291def790adb071eedc35299c Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Tue, 8 Dec 2020 09:12:11 -0800 Subject: [PATCH] fix(dev-infra): correct the environment variable to skip husky during merge (#40025) With the migration to husky@5, the environment variable used to skip husky changed from `HUSKY_SKIP_HOOKS` to `HUSKY`. To continue skipping husky during the merge process as expected, the environment variable used is updated. PR Close #40025 --- dev-infra/ng-dev.js | 2 +- dev-infra/pr/merge/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-infra/ng-dev.js b/dev-infra/ng-dev.js index b1bb871c26..e616a137ec 100755 --- a/dev-infra/ng-dev.js +++ b/dev-infra/ng-dev.js @@ -4208,7 +4208,7 @@ function mergePullRequest(prNumber, githubToken, projectRoot, config) { case 0: // Set the environment variable to skip all git commit hooks triggered by husky. We are unable to // rely on `--no-verify` as some hooks still run, notably the `prepare-commit-msg` hook. - process.env['HUSKY_SKIP_HOOKS'] = '1'; + process.env['HUSKY'] = '0'; return [4 /*yield*/, createPullRequestMergeTask(githubToken, projectRoot, config)]; case 1: api = _a.sent(); diff --git a/dev-infra/pr/merge/index.ts b/dev-infra/pr/merge/index.ts index f1dff5031e..cddc947394 100644 --- a/dev-infra/pr/merge/index.ts +++ b/dev-infra/pr/merge/index.ts @@ -34,7 +34,7 @@ export async function mergePullRequest( config?: MergeConfigWithRemote) { // Set the environment variable to skip all git commit hooks triggered by husky. We are unable to // rely on `--no-verify` as some hooks still run, notably the `prepare-commit-msg` hook. - process.env['HUSKY_SKIP_HOOKS'] = '1'; + process.env['HUSKY'] = '0'; const api = await createPullRequestMergeTask(githubToken, projectRoot, config);