Skip to content

Commit 0b4379d

Browse files
committed
Quick fix: Support -all together with -projects
- remove need to specify `/p:BuildAllProjects=true` - nit: simplify some Boolean logic
1 parent d54834e commit 0b4379d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,16 @@ if ($DumpProcesses -or $CI) {
185185
if ($All) {
186186
$MSBuildArguments += '/p:BuildAllProjects=true'
187187
}
188-
elseif ($Projects) {
188+
189+
if ($Projects) {
189190
if (![System.IO.Path]::IsPathRooted($Projects))
190191
{
191192
$Projects = Join-Path (Get-Location) $Projects
192193
}
193194
$MSBuildArguments += "/p:ProjectToBuild=$Projects"
194195
}
195196
# When adding new sub-group build flags, add them to this check.
196-
elseif((-not $BuildNative) -and (-not $BuildManaged) -and (-not $BuildNodeJS) -and (-not $BuildInstallers) -and (-not $BuildJava)) {
197+
elseif (-not ($All -or $BuildNative -or $BuildManaged -or $BuildNodeJS -or $BuildInstallers -or $BuildJava)) {
197198
Write-Warning "No default group of projects was specified, so building the 'managed' and its dependent subsets of projects. Run ``build.cmd -help`` for more details."
198199

199200
# This goal of this is to pick a sensible default for `build.cmd` with zero arguments.
@@ -203,7 +204,7 @@ elseif((-not $BuildNative) -and (-not $BuildManaged) -and (-not $BuildNodeJS) -a
203204
}
204205

205206
if ($BuildManaged -or ($All -and (-not $NoBuildManaged))) {
206-
if ((-not $BuildNodeJS) -and (-not $NoBuildNodeJS)) {
207+
if (-not ($BuildNodeJS -or $NoBuildNodeJS)) {
207208
$node = Get-Command node -ErrorAction Ignore -CommandType Application
208209

209210
if ($node) {

0 commit comments

Comments
 (0)