File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 312312fi` ;
313313 case Shell . Powershell :
314314 case Shell . Pwsh :
315- return `$__IsCommandFlag = ([Environment]::GetCommandLineArgs() | ForEach -Object { $_.contains("-Command") }) -contains $true
316- $__IsNoExitFlag = ([Environment]::GetCommandLineArgs() | ForEach -Object { $_.contains("-NoExit") }) -contains $true
315+ return `$__IsCommandFlag = ([Environment]::GetCommandLineArgs() | Where -Object { $_ -imatch '^-c(ommand)?$' }).Count -gt 0
316+ $__IsNoExitFlag = ([Environment]::GetCommandLineArgs() | Where -Object { $_ -imatch '^-noe(xit)?$' }).Count -gt 0
317317$__IsInteractive = -not $__IsCommandFlag -or ($__IsCommandFlag -and $__IsNoExitFlag)
318318if ([string]::IsNullOrEmpty($env:ISTERM) -and [Environment]::UserInteractive -and $__IsInteractive -and [string]::IsNullOrEmpty($env:VSCODE_RESOLVING_ENVIRONMENT)) {
319319 is -s ${ shell }
You can’t perform that action at this time.
0 commit comments