Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI default flags is overriding local np-config.jon flags #754

Open
newfylox opened this issue Aug 15, 2024 · 0 comments
Open

CLI default flags is overriding local np-config.jon flags #754

newfylox opened this issue Aug 15, 2024 · 0 comments

Comments

@newfylox
Copy link

newfylox commented Aug 15, 2024

When using local config flags, some of them are overridden by the default CLI flags

Description

I have a local config file with a tests flag set to false, but it gets set to true when running np CLI without any flags.

This is where it happened

https://github.com/sindresorhus/np/blob/main/source/cli-implementation.js#L113-L117

and with here, there is no way to set tests flag to false

https://github.com/sindresorhus/np/blob/main/source/cli-implementation.js#L63-L65

I put some console.log inside ./node_modules/np/source/cli-implementation.js and here are the outputs. First is my local config flags and second is the default CLI ones. Then the third is the final merged options result.

2024-08-15_13-38
2024-08-15_13-38_1

Expected behavior

It should have no default CLI flags if not using it in terminal script.

Environment

np - 10.0.7
Node.js - 20.11.0
npm - 10.8.2
Git - 2.34.1
OS - Linux Mint 21.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant