Fix psmodulerestore path when built in VSCode (#8075)

This commit is contained in:
Steve Lee 2018-10-21 02:38:15 +08:00 committed by Travis Plunk
parent 734a139457
commit ef504e5212

View File

@ -362,7 +362,13 @@ Fix steps:
}
# Get the folder path where pwsh.exe is located.
$publishPath = Split-Path $Options.Output -Parent
if ((Split-Path $Options.Output -Leaf) -like "pwsh*") {
$publishPath = Split-Path $Options.Output -Parent
}
else {
$publishPath = $Options.Output
}
try {
# Relative paths do not work well if cwd is not changed to project
Push-Location $Options.Top