mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
1bfe63a6d0
The merge driver for `errors.json` has been around for a while, and seems to work without issues. This PR enables it by default by installing it in `postinstall`(via the existing `git-configure.mjs` script which is invoked from there already) It also adds `scripts/merge-errors-json/uninstall` to temporarily disable it in case of issues. If the driver crashes, we'll also print instructions on how to disable it.
20 lines
499 B
JavaScript
20 lines
499 B
JavaScript
// @ts-check
|
|
import execa from 'execa'
|
|
|
|
// See https://github.com/vercel/next.js/pull/47375
|
|
await execa('git', ['config', 'index.skipHash', 'false'], {
|
|
stdio: 'inherit',
|
|
reject: false,
|
|
})
|
|
|
|
// Enable the errors.json git merge driver.
|
|
// It can be disabled by running:
|
|
//
|
|
// scripts/merge-errors-json/uninstall
|
|
//
|
|
// or by manually removing the `[merge "errors-json"]` section from your .git/config.
|
|
await execa('scripts/merge-errors-json/install', [], {
|
|
stdio: 'inherit',
|
|
reject: false,
|
|
})
|