diff --git a/common/changes/@microsoft/rush/git-hook-passthrough_2023-06-14-16-10.json b/common/changes/@microsoft/rush/git-hook-passthrough_2023-06-14-16-10.json new file mode 100644 index 00000000000..cb72a80f19c --- /dev/null +++ b/common/changes/@microsoft/rush/git-hook-passthrough_2023-06-14-16-10.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix an issue where arguments weren't passed to git hook scripts.", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts index bb2dc89a595..ae2ee615e67 100644 --- a/libraries/rush-lib/src/logic/base/BaseInstallManager.ts +++ b/libraries/rush-lib/src/logic/base/BaseInstallManager.ts @@ -487,7 +487,7 @@ SCRIPT_DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" SCRIPT_IMPLEMENTATION_PATH="$SCRIPT_DIR/${hookRelativePath}/${filename}" if [[ -f "$SCRIPT_IMPLEMENTATION_PATH" ]]; then - "$SCRIPT_IMPLEMENTATION_PATH" + "$SCRIPT_IMPLEMENTATION_PATH" $@ else echo "The ${filename} Git hook no longer exists in your version of the repo. Run 'rush install' or 'rush update' to refresh your installed Git hooks." >&2 fi