Skip to content

Commit 0ab216e

Browse files
author
Kapil Borle
committed
Fix retrieving solution path
1 parent bf7bb2c commit 0ab216e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

buildCoreClr.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
[switch]$install
55
)
66

7-
$solutionDir = "$HOME\Source\Repos\PSScriptAnalyzer"
7+
$solutionDir = Split-Path $MyInvocation.InvocationName
8+
if (-not (Test-Path "$solutionDir/global.json"))
9+
{
10+
throw "Not in solution root"
11+
}
812

9-
$itemsToCopy = @("$solutionDir\Engine\bin\debug\netcoreapp1.0\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll",
10-
"$solutionDir\Rules\bin\debug\netcoreapp1.0\Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.dll",
13+
$itemsToCopy = @("$solutionDir\Engine\bin\Debug\netcoreapp1.0\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll",
14+
"$solutionDir\Rules\bin\Debug\netcoreapp1.0\Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.dll",
1115
"$solutionDir\Engine\PSScriptAnalyzer.psd1",
1216
"$solutionDir\Engine\PSScriptAnalyzer.psm1",
1317
"$solutionDir\Engine\ScriptAnalyzer.format.ps1xml",

0 commit comments

Comments
 (0)