Skip to content

Commit eda6fdd

Browse files
author
Kapil Borle
committed
Add check for null profile value
1 parent f509cbf commit eda6fdd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ if ($BuildDocs)
110110
New-ExternalHelp -Path $markdownDocsPath -OutputPath $outputDocsPath -Force -Verbose:$verbosity
111111
}
112112

113-
114-
$moduleRootPath = Join-Path (Split-Path $profile) 'Modules'
113+
# Appyeyor errors out due to $profile being null. Hence...
114+
$moduleRootPath = "$HOME/Documents/WindowsPowerShell/Modules"
115+
if ($profile -ne $null)
116+
{
117+
$moduleRootPath = Join-Path (Split-Path $profile) 'Modules'
118+
}
115119
$modulePSSAPath = Join-Path $moduleRootPath 'PSScriptAnalyzer'
116120
if ($Install)
117121
{

0 commit comments

Comments
 (0)