diff options
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 20d1df35..8d9578e8 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -162,7 +162,7 @@ export async function startContinuePythonServer() { getExtensionUri().fsPath, "server", "exe", - "run" + (os.platform() === "win32" ? ".exe" : "") + `run${os.platform() === "win32" ? ".exe" : ""}` ); // First, check if the server is already downloaded @@ -203,6 +203,13 @@ export async function startContinuePythonServer() { console.log("stderr: ", stderr1); } + // Validate that the file exists + if (!fs.existsSync(destination)) { + const errText = `- Failed to install Continue server.`; + vscode.window.showErrorMessage(errText); + throw new Error(errText); + } + // Run the executable console.log("Starting Continue server..."); const child = spawn(destination, { |