From 4421a3e9c2098b5b2793449a03cdf390e81aa460 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 2 Aug 2023 23:15:48 -0700 Subject: add .exe on windows --- extension/src/activation/environmentSetup.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'extension') 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, { -- cgit v1.2.3-70-g09d2