summaryrefslogtreecommitdiff
path: root/extension/src/activation
diff options
context:
space:
mode:
authorTy Dunn <ty@tydunn.com>2023-06-29 10:55:08 -0700
committerTy Dunn <ty@tydunn.com>2023-06-29 10:55:08 -0700
commitd03918f6b6bd42d6342b1e988020c302580cf049 (patch)
tree326617926e03c6d5a95e8c31cce4028803a865b5 /extension/src/activation
parent60ea270a4521b01acebbb6f6199d0fb9130449a7 (diff)
parent178c784639de9cd052d3cfb56183a584ab885549 (diff)
downloadsncontinue-d03918f6b6bd42d6342b1e988020c302580cf049.tar.gz
sncontinue-d03918f6b6bd42d6342b1e988020c302580cf049.tar.bz2
sncontinue-d03918f6b6bd42d6342b1e988020c302580cf049.zip
Merge branch 'main' of github.com:continuedev/continue
Diffstat (limited to 'extension/src/activation')
-rw-r--r--extension/src/activation/environmentSetup.ts9
1 files changed, 4 insertions, 5 deletions
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) => {