mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-09 17:19:02 +00:00
fix(release): use relative postinstall patch dir (#5973)
This commit is contained in:
parent
68a9de4752
commit
98dec4fa71
2 changed files with 3 additions and 6 deletions
|
|
@ -394,10 +394,11 @@ if (chromeDevtoolsMcpPackageJson) {
|
|||
if (!installRoot || !existsSync(patchDir)) {
|
||||
process.exit(0);
|
||||
}
|
||||
const relativePatchDir = path.relative(installRoot, patchDir) || '.';
|
||||
const patchPackageBin = require.resolve('patch-package/index.js');
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[patchPackageBin, '--patch-dir', patchDir, '--error-on-fail'],
|
||||
[patchPackageBin, '--patch-dir', relativePatchDir, '--error-on-fail'],
|
||||
{ cwd: installRoot, stdio: 'inherit' },
|
||||
);
|
||||
if (result.signal) {
|
||||
|
|
|
|||
|
|
@ -229,11 +229,7 @@ describe('package asset scripts', () => {
|
|||
|
||||
const realDistDir = realpathSync(distDir);
|
||||
expect(JSON.parse(readFileSync(markerPath, 'utf8'))).toEqual({
|
||||
argv: [
|
||||
'--patch-dir',
|
||||
path.join(realDistDir, 'patches'),
|
||||
'--error-on-fail',
|
||||
],
|
||||
argv: ['--patch-dir', 'patches', '--error-on-fail'],
|
||||
cwd: realDistDir,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue