Skip to content

Verbose at the end of dart pub global run <pkg> considered by pub get #4690

@FMorschel

Description

@FMorschel

Environment

Dart: 3.11.0-edge.1974c2360e1ee4345b9cb15929b1a2465559dc18
OS: Windows 11

Problem

I'm hitting #4672 at my local project (https://github.com/FMorschel/dgt/). It is fine, I'm waiting so that gets fixed. This is a separate problem but hitting that caused me to find this one.

I'm running this project on a different path with dart pub global run. It behaved fine until I hit the above-mentioned issue. That caused the underlying command to run pub get before building. This is still fine most of the time, but when I added a -v at the end of my own command: dart pub global run dgt -v it started giving me the full verbose output of pub get too.

Expected behavior

I expected it to be parsed only by my own command, and not dart pub global run. I was talking with @DanTup, and he said:

return argResults.flag('verbose') || isVerbose();

Probably here, this argResults has everything in

Actual behavior

As described above, the --verbose/-v command was parsed by dart pub global run while I was trying to pass it to my own command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions