Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89a47025 authored by Sam Delmerico's avatar Sam Delmerico
Browse files

prevent unintended m bp2build "" when running b

cl/2045666 allowed the --skip-soong-tests flag to pass through
invocations of the `b` command to soong_ui. But when the flag was
missing, an extra `""` argument was passed instead which caused soong_ui
to invoke a build of the droid target.

Test: m clean && b build '...'  # verify Soong does not run a build
Change-Id: I7b99437d225786eb1698a88d0c755ce897550e70
parent 4a723d0e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1730,7 +1730,7 @@ function b()
    local skip_tests=$(echo "$@" | grep -ow -- "--skip-soong-tests")
    local bazel_args=(${@/--skip-soong-tests/})
    # Generate BUILD, bzl files into the synthetic Bazel workspace (out/soong/workspace).
    _trigger_build "all-modules" bp2build USE_BAZEL_ANALYSIS= "$skip_tests" || return 1
    _trigger_build "all-modules" bp2build USE_BAZEL_ANALYSIS= $skip_tests || return 1
    # Then, run Bazel using the synthetic workspace as the --package_path.
    if [[ -z "$bazel_args" ]]; then
        # If there are no args, show help.