File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
src/PSAppDeployToolkit.Tools/PSScriptAnalyzer Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -1884,19 +1884,12 @@ function Measure-ADTCompatibility
18841884 ' ForceCloseAppsCountdown' = { " -ForceCloseProcessesCountdown $_ " }
18851885 ' AllowDeferCloseApps' = ' -AllowDeferCloseProcesses' # Should inspect switch values here in case of -Switch:$false
18861886 ' CloseApps' = {
1887- if ($boundParameters .CloseApps.Value.StringConstantType -eq ' DoubleQuoted ' )
1887+ if ($_ -match ' ^$ ' )
18881888 {
1889- $quoteChar = ' "'
1890- }
1891- elseif ($boundParameters.CloseApps.Value.StringConstantType -eq ' DoubleQuoted' )
1892- {
1893- $quoteChar = " '"
1894- }
1895- else
1896- {
1897- # Not a string, pass through original value
1889+ # This is a variable, Not a string, pass through original value
18981890 return " -CloseProcesses $_ "
18991891 }
1892+ $quoteChar = if ($_.StartsWith (' "' )) { ' "' } else { " '" }
19001893 $closeProcesses = $_.ToString ().Trim(' "' ).Trim(" '" ) -split ' ,' | & {
19011894 process
19021895 {
You can’t perform that action at this time.
0 commit comments