File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ if (-not (Test-Path $builtinModulePath))
3838
3939Function IsPSEditionDesktop
4040{
41- $PSEdition -eq $null -or $PSEdition -eq ' Desktop'
41+ $edition = Get-Variable - Name PSEdition - ErrorAction Ignore
42+ ($edition -eq $null ) -or ($edition -eq ' Desktop' )
4243}
4344
4445Function Get-CmdletDataFileName
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Function Get-SolutionRoot
2525 $solutionFilename = ' psscriptanalyzer.sln'
2626 if (-not (Test-Path (Join-Path $root $solutionFilename )))
2727 {
28- $null
28+ return $null
2929 }
3030 $root
3131}
@@ -35,7 +35,7 @@ Function Get-RuleProjectRoot
3535 $slnRoot = Get-SolutionRoot
3636 if ($slnRoot -eq $null )
3737 {
38- $null
38+ return $null
3939 }
4040 Join-Path $slnRoot " Rules"
4141}
@@ -45,7 +45,7 @@ Function Get-RuleProjectFile
4545 $prjRoot = Get-RuleProjectRoot
4646 if ($prjRoot -eq $null )
4747 {
48- $null
48+ return $null
4949 }
5050 Join-Path $prjRoot " ScriptAnalyzerBuiltinRules.csproj"
5151}
You can’t perform that action at this time.
0 commit comments