From 1c85d3c1e184bb6434339af533df16667866e786 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 29 Jun 2023 09:51:24 -0700 Subject: messaging of welcome step --- extension/src/activation/environmentSetup.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'extension/src/activation') diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 823670fd..b8c23733 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -150,11 +150,10 @@ async function setupPythonEnv() { // Repeat until it is successfully created (sometimes it fails to generate the bin, need to try again) while (true) { const [, stderr] = await runCommand(createEnvCommand); - if (stderr) { - throw new Error(stderr); - } if (checkEnvExists()) { break; + } else if (stderr) { + throw new Error(stderr); } else { // Remove the env and try again const removeCommand = `rm -rf "${path.join( @@ -180,7 +179,6 @@ async function setupPythonEnv() { activateCmd, pipUpgradeCmd, `${pipCmd} install -r requirements.txt`, - touchCmd, ].join(" ; "); const [, stderr] = await runCommand(installRequirementsCommand); if (stderr) { @@ -273,13 +271,14 @@ export async function startContinuePythonServer() { console.log(`stdout: ${data}`); }); child.stderr.on("data", (data: any) => { - console.log(`stderr: ${data}`); if ( data.includes("Uvicorn running on") || // Successfully started the server data.includes("address already in use") // The server is already running (probably a simultaneously opened VS Code window) ) { console.log("Successfully started Continue python server"); resolve(null); + } else { + console.log(`stderr: ${data}`); } }); child.on("error", (error: any) => { -- cgit v1.2.3-70-g09d2