File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ if (-not (Test-Path $builtinModulePath))
38
38
39
39
Function IsPSEditionDesktop
40
40
{
41
- $ PSEdition -eq $null -or $PSEdition -eq ' Desktop'
41
+ ( Get-Variable - Name PSEdition - ErrorAction Ignore) -or ( $PSEdition -eq ' Desktop' )
42
42
}
43
43
44
44
Function Get-CmdletDataFileName
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Function Get-SolutionRoot
25
25
$solutionFilename = ' psscriptanalyzer.sln'
26
26
if (-not (Test-Path (Join-Path $root $solutionFilename )))
27
27
{
28
- $null
28
+ return $null
29
29
}
30
30
$root
31
31
}
@@ -35,7 +35,7 @@ Function Get-RuleProjectRoot
35
35
$slnRoot = Get-SolutionRoot
36
36
if ($slnRoot -eq $null )
37
37
{
38
- $null
38
+ return $null
39
39
}
40
40
Join-Path $slnRoot " Rules"
41
41
}
@@ -45,7 +45,7 @@ Function Get-RuleProjectFile
45
45
$prjRoot = Get-RuleProjectRoot
46
46
if ($prjRoot -eq $null )
47
47
{
48
- $null
48
+ return $null
49
49
}
50
50
Join-Path $prjRoot " ScriptAnalyzerBuiltinRules.csproj"
51
51
}
You can’t perform that action at this time.
0 commit comments