Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix postinstall when using tarball #60443

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"next-no-sourcemaps": "cross-env NEXT_TELEMETRY_DISABLED=1 node --trace-deprecation packages/next/dist/bin/next",
"clean-trace-jaeger": "node scripts/rm.mjs test/integration/basic/.next && TRACE_TARGET=JAEGER pnpm next build test/integration/basic",
"debug": "cross-env NEXT_TELEMETRY_DISABLED=1 node --inspect packages/next/dist/bin/next",
"postinstall": "git config index.skipHash false && node scripts/install-native.mjs",
"postinstall": "node scripts/git-configure.mjs && node scripts/install-native.mjs",
"version": "pnpm install --no-frozen-lockfile && IS_PUBLISH=yes ./scripts/check-pre-compiled.sh && git add .",
"prepare": "husky install",
"sync-react": "node ./scripts/sync-react.js",
Expand Down
12 changes: 12 additions & 0 deletions scripts/git-configure.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import execa from 'execa'

// See https://github.com/vercel/next.js/pull/47375
const { stdout, stderr } = await execa(
'git',
['config', 'index.skipHash', 'false'],
{
reject: false,
}
)

console.log(stderr + stdout)