Skip to content

Commit f2f3267

Browse files
Made runTestsCI throw errors when extension installation fails
1 parent 841c7dd commit f2f3267

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/scripts/runTestsCI.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,23 @@ function installExtensionDependencies(vscodeExecutablePath: string) {
6060
stdio: "inherit",
6161
});
6262

63-
if (status !== 0) {
64-
console.log("status: ", status);
63+
const messageParts: string[] = [];
64+
65+
if (status != null && status !== 0) {
66+
messageParts.push(`Status: ${status}`);
67+
}
68+
if (signal != null) {
69+
messageParts.push(`Signal: ${signal}`);
6570
}
66-
if (signal) {
67-
console.log("signal: ", signal);
71+
if (messageParts.length > 0) {
72+
const message = `Extension installation failed. ${messageParts.join(", ")}`;
73+
if (error == null) {
74+
throw new Error(message);
75+
}
76+
console.error(message);
6877
}
69-
if (error) {
70-
console.log("error: ", error);
78+
if (error != null) {
79+
throw error;
7180
}
7281

7382
console.log("Finished installing dependency extensions");

0 commit comments

Comments
 (0)