Fix one last case of not skipping hooks when cloning in code analyzer (#36912)

Fix one last case of not skipping hooks when cloning.
This commit is contained in:
Sam Seay 2023-02-22 20:50:45 +13:00 committed by GitHub
parent ddb675f04b
commit 4b345402ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -50,9 +50,12 @@ export const scanForChanges = async (
// Only checkout the compare version if we're in CLI mode.
if ( outputStyle === 'cli' ) {
execSync( `cd ${ tmpRepoPath } && git checkout ${ compareVersion }`, {
stdio: 'pipe',
} );
execSync(
`cd ${ tmpRepoPath } && git -c core.hooksPath=/dev/null checkout ${ compareVersion }`,
{
stdio: 'pipe',
}
);
}
const pluginPath = join( tmpRepoPath, 'plugins/woocommerce' );