summaryrefslogtreecommitdiff
path: root/extension/src
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-28 17:36:31 -0700
committerNate Sesti <sestinj@gmail.com>2023-06-28 17:36:31 -0700
commitb25b737c50fc819d422d776ad25e7221fa18b884 (patch)
tree73a5bf8ba230b6fd6c0ca4b39496aa7a3eb4d1e0 /extension/src
parent542d9b72d5b413c33d5b670c5d605af71ad74695 (diff)
downloadsncontinue-b25b737c50fc819d422d776ad25e7221fa18b884.tar.gz
sncontinue-b25b737c50fc819d422d776ad25e7221fa18b884.tar.bz2
sncontinue-b25b737c50fc819d422d776ad25e7221fa18b884.zip
fixes
Diffstat (limited to 'extension/src')
-rw-r--r--extension/src/activation/activate.ts3
-rw-r--r--extension/src/activation/environmentSetup.ts28
2 files changed, 17 insertions, 14 deletions
diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts
index df8b6871..05589d92 100644
--- a/extension/src/activation/activate.ts
+++ b/extension/src/activation/activate.ts
@@ -28,7 +28,8 @@ export async function activateExtension(
vscode.window.withProgress(
{
location: vscode.ProgressLocation.Notification,
- title: "Starting Continue Server...",
+ title:
+ "Starting Continue Server... (it may take a minute to download Python packages)",
cancellable: false,
},
async (progress, token) => {
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index 6ea60195..4e6227c7 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -101,26 +101,28 @@ function checkEnvExists() {
}
function checkRequirementsInstalled() {
- const envLibsPath = path.join(
+ let envLibsPath = path.join(
getExtensionUri().fsPath,
"scripts",
"env",
process.platform == "win32" ? "Lib" : "lib"
);
- // Get the python version folder name
- const pythonVersions = fs.readdirSync(envLibsPath).filter((f: string) => {
- return f.startsWith("python");
- });
- if (pythonVersions.length == 0) {
- return false;
+ // If site-packages is directly under env, use that
+ if (fs.existsSync(path.join(envLibsPath, "site-packages"))) {
+ envLibsPath = path.join(envLibsPath, "site-packages");
+ } else {
+ // Get the python version folder name
+ const pythonVersions = fs.readdirSync(envLibsPath).filter((f: string) => {
+ return f.startsWith("python");
+ });
+ if (pythonVersions.length == 0) {
+ return false;
+ }
+ const pythonVersion = pythonVersions[0];
+ envLibsPath = path.join(envLibsPath, pythonVersion, "site-packages");
}
- const continuePath = path.join(
- envLibsPath,
- pythonVersions[0],
- "site-packages",
- "continuedev"
- );
+ const continuePath = path.join(envLibsPath, "continuedev");
return fs.existsSync(continuePath);