Skip to content

extra_args lost when running in a sub-directory #536

@Globegitter

Description

@Globegitter

I have written a plugin for nodejs and to be able to configure the name of the external repository where all yarn/npm dependencies are being installed added a flag npm_workspace_name which I am setting as follows:

gazelle(
    name = "gazelle",
    gazelle = ":gazelle_js",
    prefix = "github.com/ecosia/core",
    extra_args = [
        "-npm_workspace_name",
        "global-yarn",
    ],
)

This works fine when running bazel run //:gazelle but if I no run bazel run //:gazelle -- app to just run gazelle in a subdir the flag is being lost and the default value of that flag is being applied which is quite confusing.

Maybe it makes sense to not strip off extra_args when running in a subdir?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions