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

feature: Implement yarn global config set|get #1037

Closed
FLGMwt opened this issue Oct 14, 2016 · 4 comments
Closed

feature: Implement yarn global config set|get #1037

FLGMwt opened this issue Oct 14, 2016 · 4 comments
Labels
cat-feature fixed-in-modern This issue has been fixed / implemented in Yarn 2+. good first issue help wanted triaged

Comments

@FLGMwt
Copy link
Contributor

FLGMwt commented Oct 14, 2016

Do you want to request a feature or report a bug?
bug
What is the current behavior?
Currently, all yarn config set and yarn config remove commands modify home config, whether -g is set or not.
If the current behavior is a bug, please provide the steps to reproduce.
yarn config set foo bar
notice user level .yarnrc is modified
👍

yarn config set foo bar --global
notice user level .yarnrc is modified and global .yarnrc is unmodified
👎

What is the expected behavior?
--global should only modify global .yarnrc
Please mention your node.js, yarn and operating system version.

> node -v
v6.7.0
> npm -v
3.10.3
> yarn --version
0.15.1
@FLGMwt FLGMwt changed the title -|--global option passed to yarn config is ignored -g|--global option passed to yarn config is ignored Oct 14, 2016
@ahmedelgabri
Copy link
Contributor

actually I have this the other way around.

$ yarn config set exact true

# and

$ yarn config set exact true -g

Both create and manipulate the global .yarnrc file.

I'm using 0.17.9

@BYK
Copy link
Member

BYK commented Oct 27, 2017

I've changed the issue since I don't think we are going to implement -g or --global flags. That would be inconsistent with how we do things. I think having a yarn global config command would be nice tho.

@sla89
Copy link

sla89 commented Feb 2, 2018

The yarn config documentation mentions the -gand --global flag for setting configuration values globally but as mentioned here this feature does not work.

@paul-soporan
Copy link
Member

paul-soporan commented Jan 2, 2021

Closing as fixed in v2: v2's yarn config set works on the project configuration and yarn config set --home works on the home configuration.

https://yarnpkg.com/getting-started/migration

@paul-soporan paul-soporan added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat-feature fixed-in-modern This issue has been fixed / implemented in Yarn 2+. good first issue help wanted triaged
Projects
None yet
Development

No branches or pull requests

7 participants