Skip to content

Commit

Permalink
Merge pull request microsoft#4247 from kamontat/patch-1
Browse files Browse the repository at this point in the history
[@microsoft/rush-lib] Git 'pre-push' hooks didn't handle error correctly
  • Loading branch information
iclanton authored Jul 24, 2023
2 parents ca870fa + 93d0bf7 commit 25a04d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Fix an issue where the git pre-push hook would allow push to go through if the script exited with error.",
"type": "patch"
}
],
"packageName": "@microsoft/rush"
}
1 change: 1 addition & 0 deletions libraries/rush-lib/src/logic/base/BaseInstallManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ fi
: '';

const hookFileContent: string = `#!/bin/bash
set -e
SCRIPT_DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
SCRIPT_IMPLEMENTATION_PATH="$SCRIPT_DIR/${hookRelativePath}/${filename}"
Expand Down

0 comments on commit 25a04d1

Please sign in to comment.