Skip to content

Commit 364a678

Browse files
committed
fix(e2e): load hdiff from cli dependencies
1 parent c19a7db commit 364a678

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Example/e2etest/scripts/prepare-local-update-artifacts.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function runPushy(args: string[], cwd: string) {
111111
}
112112

113113
function ensureHdiffModule() {
114-
const modulePath = path.join(projectRoot, 'node_modules/node-hdiffpatch');
114+
const modulePath = path.join(cliRoot, 'node_modules/node-hdiffpatch');
115115
if (!fs.existsSync(modulePath)) {
116116
console.log('node-hdiffpatch not found, installing...');
117117
const result = spawnSync(
@@ -124,7 +124,7 @@ function ensureHdiffModule() {
124124
'node-hdiffpatch',
125125
],
126126
{
127-
cwd: projectRoot,
127+
cwd: cliRoot,
128128
stdio: 'inherit',
129129
env: process.env,
130130
},
@@ -137,7 +137,7 @@ function ensureHdiffModule() {
137137
}
138138
}
139139
if (!fs.existsSync(modulePath)) {
140-
throw new Error(`Failed to install node-hdiffpatch under: ${projectRoot}`);
140+
throw new Error(`Failed to install node-hdiffpatch under: ${cliRoot}`);
141141
}
142142
const hdiffModule = require(modulePath) as {
143143
diff?: (oldSource?: Buffer, newSource?: Buffer) => Buffer;

0 commit comments

Comments
 (0)