Skip to content

Commit 93bf5cc

Browse files
author
Kartik Raj
authored
Handle localized shells when powershell execution is disabled (microsoft#22360)
Closes microsoft#22352
1 parent 56a88b8 commit 93bf5cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/client/interpreter/activation/service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,10 @@ export class EnvironmentActivationService implements IEnvironmentActivationServi
330330
if (result.stderr) {
331331
if (returnedEnv) {
332332
traceWarn('Got env variables but with errors', result.stderr, returnedEnv);
333-
if (result.stderr.includes('running scripts is disabled')) {
333+
if (
334+
result.stderr.includes('running scripts is disabled') ||
335+
result.stderr.includes('FullyQualifiedErrorId : UnauthorizedAccess')
336+
) {
334337
throw new Error(
335338
`Skipping returned result when powershell execution is disabled, stderr ${result.stderr} for ${command}`,
336339
);

0 commit comments

Comments
 (0)