diff options
author | Ty Dunn <ty@tydunn.com> | 2023-06-05 22:54:08 +0200 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-06-05 22:54:08 +0200 |
commit | 5f3d975cb3bef13769cb19ff3f604fe42cc9ee5d (patch) | |
tree | e4360fd64cbc021d4898dd87b0a9a66f37ab5475 /extension/src/activation/environmentSetup.ts | |
parent | 1261c54b736b29be361ac30fe1fd9bad52e62c2d (diff) | |
download | sncontinue-5f3d975cb3bef13769cb19ff3f604fe42cc9ee5d.tar.gz sncontinue-5f3d975cb3bef13769cb19ff3f604fe42cc9ee5d.tar.bz2 sncontinue-5f3d975cb3bef13769cb19ff3f604fe42cc9ee5d.zip |
fixing windows install issue
Diffstat (limited to 'extension/src/activation/environmentSetup.ts')
-rw-r--r-- | extension/src/activation/environmentSetup.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts index 21f867b1..2410dcca 100644 --- a/extension/src/activation/environmentSetup.ts +++ b/extension/src/activation/environmentSetup.ts @@ -14,7 +14,7 @@ async function runCommand(cmd: string): Promise<[string, string | undefined]> { var stdout: any = ""; var stderr: any = ""; try { - var { stdout, stderr } = await exec(cmd); + var { stdout, stderr } = await exec(cmd, {'shell':'powershell.exe'}); } catch (e: any) { stderr = e.stderr; stdout = e.stdout; @@ -70,7 +70,7 @@ function checkEnvExists() { ); return ( fs.existsSync(path.join(envBinPath, "activate")) && - fs.existsSync(path.join(envBinPath, "pip")) + fs.existsSync(path.join(envBinPath, process.platform == "win32" ? "pip.exe" : "pip")) ); } @@ -88,7 +88,11 @@ async function setupPythonEnv() { const createEnvCommand = [ `cd ${path.join(getExtensionUri().fsPath, "scripts")}`, `${pythonCmd} -m venv env`, - ].join(" ; "); + ].join("; "); + + const [here, something] = await runCommand(`cd ${path.join(getExtensionUri().fsPath, "scripts")}`); + const [here1, something1] = await runCommand('cd c:\\Users\\Ty\\Documents\\continuedev\\continue\\extension\\scripts; python -m venv env'); + // console.log('cd c:\\Users\\Ty\\Documents\\continuedev\\continue\\extension\\scripts; c:\\Program` Files\\Python310\\python.exe -m venv env'); // Repeat until it is successfully created (sometimes it fails to generate the bin, need to try again) while (true) { |