diff options
author | Ty Dunn <ty@tydunn.com> | 2023-07-03 19:42:38 -0700 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-07-03 19:42:38 -0700 |
commit | 524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54 (patch) | |
tree | e9a148b84074c211b75e2623a73326e31a6e5bb1 /extension/src/activation/environmentSetup.ts | |
parent | 49de11a268d047da918ead7f0789b30145e92df1 (diff) | |
parent | ed85171a423048a2a11a7d2a911dea8c4f332324 (diff) | |
download | sncontinue-524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54.tar.gz sncontinue-524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54.tar.bz2 sncontinue-524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54.zip |
Merge branch 'main' of github.com:continuedev/continue
Diffstat (limited to 'extension/src/activation/environmentSetup.ts')
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 4e6be9b3..71b774d9 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -4,7 +4,6 @@ const exec = util.promisify(require("child_process").exec); const { spawn } = require("child_process"); import * as path from "path"; import * as fs from "fs"; -import rebuild from "@electron/rebuild"; import { getContinueServerUrl } from "../bridge"; import fetch from "node-fetch"; import * as vscode from "vscode"; @@ -60,7 +59,7 @@ async function runCommand(cmd: string): Promise<[string, string | undefined]> { return [stdout, stderr]; } -async function getPythonPipCommands() { +export async function getPythonPipCommands() { var [stdout, stderr] = await runCommand("python3 --version"); let pythonCmd = "python3"; if (stderr) { @@ -111,10 +110,8 @@ async function getPythonPipCommands() { ); throw new Error("Python3.8 or greater is not installed."); } - } else { - pythonCmd = `python${major}.${minor}`; - pipCmd = `pip${major}.${minor}`; } + return [pythonCmd, pipCmd]; } @@ -368,16 +365,6 @@ export async function startContinuePythonServer() { }); } -async function installNodeModules() { - console.log("Rebuilding node-pty for Continue extension..."); - await rebuild({ - buildPath: getExtensionUri().fsPath, // Folder containing node_modules - electronVersion: "19.1.8", - onlyModules: ["node-pty"], - }); - console.log("Successfully rebuilt node-pty"); -} - export function isPythonEnvSetup(): boolean { let pathToEnvCfg = getExtensionUri().fsPath + "/scripts/env/pyvenv.cfg"; return fs.existsSync(path.join(pathToEnvCfg)); |