Skip to content

Commit 0f43724

Browse files
author
Kapil Borle
committed
Set project root path in build script
1 parent bcffbcb commit 0f43724

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ Function CreateIfNotExists([string] $folderPath)
3030
}
3131
}
3232

33-
$projectRoot = Resolve-path .
33+
$projectRoot = Resolve-path (Split-Path $MyInvocation.InvocationName)
3434
$solutionPath = Join-Path $projectRoot 'PSScriptAnalyzer.sln'
3535
$outPath = Join-Path $projectRoot 'out'
3636
$destinationPath = Join-Path $outPath PSScriptAnalyzer
3737

3838
if (-not (Test-Path $solutionPath))
3939
{
40-
throw "not the right directory"
40+
$errMsg = "{0} not the right directory" -f $solutionPath
41+
throw $errMsg
4142
}
4243

4344
$buildCmd = Join-Path $projectRoot "build.cmd"

0 commit comments

Comments
 (0)