summaryrefslogtreecommitdiff
path: root/extension
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-02 23:15:48 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-02 23:15:48 -0700
commit4421a3e9c2098b5b2793449a03cdf390e81aa460 (patch)
tree1739f9ecff1f1622b79ce627e6d87f8839bbce90 /extension
parent6385338b4130d842c8af60fa7783fb576bfb3f4c (diff)
downloadsncontinue-4421a3e9c2098b5b2793449a03cdf390e81aa460.tar.gz
sncontinue-4421a3e9c2098b5b2793449a03cdf390e81aa460.tar.bz2
sncontinue-4421a3e9c2098b5b2793449a03cdf390e81aa460.zip
add .exe on windows
Diffstat (limited to 'extension')
-rw-r--r--extension/src/activation/environmentSetup.ts9
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, {