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

Commit f376161d authored by Cole Faust's avatar Cole Faust Committed by Gerrit Code Review
Browse files

Merge "Move the --config flag in the b command earlier"

parents fe9de679 a68f5166
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -1846,7 +1846,20 @@ function b()
        bazel help
    else
        # Else, always run with the bp2build configuration, which sets Bazel's package path to the synthetic workspace.
        bazel "$@" --config=bp2build
        # Add the --config=bp2build after the first argument that doesn't start with a dash. That should be the bazel
        # command. (build, test, run, ect) If the --config was added at the end, it wouldn't work with commands like:
        # b run //foo -- --args-for-foo
        local previous_args=""
        for arg in $@;
        do
            previous_args+="$arg "
            shift
            if [[ $arg != -* ]]; # if $arg doesn't start with a dash
            then
                break
            fi
        done
        bazel $previous_args --config=bp2build $@
    fi
)