Skip to content

[Bug?]: --no-defaults flag is ignore on yarn config when the --json flag is present  #6341

@chrisbodhi

Description

@chrisbodhi

Self-service

  • I'd be willing to implement a fix

Describe the bug

Running yarn config --no-defaults --json returns in a JSON format (expected) all of the config options (unexpected). I expected the yarn config command, with both flags, to return only the non-default settings in a JSON format.

To reproduce

yarn config --json --no-defaults

Environment

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.7.0 - /private/var/folders/lc/yqxr0r45775_2f5mfzyj9x2c0000gp/T/xfs-fb1e8fe6/node
    Yarn: 4.2.2 - /private/var/folders/lc/yqxr0r45775_2f5mfzyj9x2c0000gp/T/xfs-fb1e8fe6/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.7.0/bin/npm

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions