running scripts is disabled error message
This commit is contained in:
parent
35f5beabe5
commit
c0177d013e
1 changed files with 5 additions and 0 deletions
|
|
@ -195,6 +195,11 @@ async function setupPythonEnv() {
|
|||
if (checkEnvExists()) {
|
||||
break;
|
||||
} else if (stderr) {
|
||||
if (stderr.includes("Running Scripts is Disabled on this System")) {
|
||||
vscode.window.showErrorMessage(
|
||||
"A Python virtual enviroment cannot be activated because running scripts is disabled for this user. Please enable signed scripts to run with this command in PowerShell: `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`, reload VS Code, and then try again."
|
||||
);
|
||||
}
|
||||
throw new Error(stderr);
|
||||
} else {
|
||||
// Remove the env and try again
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue