mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 09:43:57 +08:00
build: fix Start-PSBuild -Output (#7504)
Make Start-PSBuild -Output $OutDir output the build to the directory properly.
This commit is contained in:
parent
c36e4ad983
commit
a4d4c31390
15
build.psm1
15
build.psm1
@ -203,6 +203,8 @@ function Start-PSBuild {
|
||||
[switch]$StopDevPowerShell,
|
||||
|
||||
[switch]$Restore,
|
||||
# Accept a path to the output directory
|
||||
# When specified, --output <path> will be passed to dotnet
|
||||
[string]$Output,
|
||||
[switch]$ResGen,
|
||||
[switch]$TypeGen,
|
||||
@ -323,11 +325,8 @@ Fix steps:
|
||||
|
||||
# setup arguments
|
||||
$Arguments = @("publish","--no-restore","/property:GenerateFullPaths=true")
|
||||
if ($Output) {
|
||||
$Arguments += "--output", $Output
|
||||
}
|
||||
elseif ($SMAOnly) {
|
||||
$Arguments += "--output", (Split-Path $script:Options.Output)
|
||||
if ($Output -or $SMAOnly) {
|
||||
$Arguments += "--output", (Split-Path $Options.Output)
|
||||
}
|
||||
|
||||
$Arguments += "--configuration", $Options.Configuration
|
||||
@ -605,6 +604,10 @@ function New-PSOptions {
|
||||
|
||||
[switch]$CrossGen,
|
||||
|
||||
# Accept a path to the output directory
|
||||
# If not null or empty, name of the executable will be appended to
|
||||
# this path, otherwise, to the default path, and then the full path
|
||||
# of the output executable will be assigned to the Output property
|
||||
[string]$Output,
|
||||
|
||||
[switch]$SMAOnly,
|
||||
@ -683,6 +686,8 @@ function New-PSOptions {
|
||||
} else {
|
||||
$Output = [IO.Path]::Combine($Top, "bin", $Configuration, $Framework, $Runtime, "publish", $Executable)
|
||||
}
|
||||
} else {
|
||||
$Output = [IO.Path]::Combine($Output, $Executable)
|
||||
}
|
||||
|
||||
if ($SMAOnly)
|
||||
|
Loading…
Reference in New Issue
Block a user