rsnext/scripts/git-configure.mjs
Steven 1662362d12
chore: fix postinstall when using tarball (#60443)
The postinstall script was failing In the case when you download [a
zip](https://codeload.github.com/vercel/next.js/zip/refs/heads/canary)
of the repo.

This PR fixes it so that `git config` can fail silently in that case
when the repo is not using git.

- Related to https://github.com/nodejs/citgm/pull/1044

Closes NEXT-2036
2024-01-09 17:37:49 -05:00

12 lines
228 B
JavaScript

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)