Skip to content

Commit

Permalink
Handle localized shells when powershell execution is disabled (#22360)
Browse files Browse the repository at this point in the history
Closes #22352
  • Loading branch information
Kartik Raj authored Oct 27, 2023
1 parent 56a88b8 commit 93bf5cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/interpreter/activation/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ export class EnvironmentActivationService implements IEnvironmentActivationServi
if (result.stderr) {
if (returnedEnv) {
traceWarn('Got env variables but with errors', result.stderr, returnedEnv);
if (result.stderr.includes('running scripts is disabled')) {
if (
result.stderr.includes('running scripts is disabled') ||
result.stderr.includes('FullyQualifiedErrorId : UnauthorizedAccess')
) {
throw new Error(
`Skipping returned result when powershell execution is disabled, stderr ${result.stderr} for ${command}`,
);
Expand Down

0 comments on commit 93bf5cc

Please sign in to comment.