Skip to content

Commit ae57ea0

Browse files
authored
[9.4][build] Apply patches (#265162) (#265163)
Backports #265162
1 parent fba5a21 commit ae57ea0

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

src/dev/build/tasks/install_dependencies_task.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10+
import { relative } from 'path';
11+
1012
import type { Task } from '../lib';
1113
import { exec } from '../lib';
1214

1315
const YARN_EXEC = process.env.npm_execpath || 'yarn';
16+
const NODE_EXEC = process.execPath || 'node';
1417

1518
export const InstallDependencies: Task = {
1619
description: 'Installing node_modules, including production builds of packages',
@@ -35,5 +38,19 @@ export const InstallDependencies: Task = {
3538
cwd: build.resolvePath(),
3639
}
3740
);
41+
42+
await exec(
43+
log,
44+
NODE_EXEC,
45+
[
46+
config.resolveFromRepo('node_modules/.bin/patch-package'),
47+
'--error-on-fail',
48+
'--patch-dir',
49+
relative(build.resolvePath(), config.resolveFromRepo('patches')),
50+
],
51+
{
52+
cwd: build.resolvePath(),
53+
}
54+
);
3855
},
3956
};

0 commit comments

Comments
 (0)