Skip to content

Commit ef114f2

Browse files
authored
Fix node18 angular test (#312)
* Continue one node18 fail * update comment * add check to upgrade for not v18 * remove continue on error * lint * lint
1 parent 3ce7ee1 commit ef114f2

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/@apphosting/adapter-angular/e2e/run-local.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ const tests = await Promise.all(
4141
stdio: "inherit",
4242
shell: true,
4343
});
44-
console.log(`[${runId}] updating angular to next tag`);
45-
console.log(`[${runId}] > npx ng update @angular/cli@next @angular/core@next`);
46-
await promiseSpawn("npx", ["ng", "update", "@angular/cli@next", "@angular/core@next"], {
47-
cwd,
48-
stdio: "inherit",
49-
shell: true,
50-
});
44+
if (parseInt(process.versions.node.split(".")[0]) > 18) {
45+
console.log(`[${runId}] updating angular to next tag`);
46+
console.log(`[${runId}] > npx ng update @angular/cli@next @angular/core@next`);
47+
await promiseSpawn("npx", ["ng", "update", "@angular/cli@next", "@angular/core@next"], {
48+
cwd,
49+
stdio: "inherit",
50+
shell: true,
51+
});
52+
}
5153
const angularJSON = JSON.parse((await readFile(join(cwd, "angular.json"))).toString());
5254

5355
if (!enableSSR) {

0 commit comments

Comments
 (0)