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

yarn config unable to set boolean value #1237

Closed
rzontar opened this issue Oct 19, 2016 · 6 comments
Closed

yarn config unable to set boolean value #1237

rzontar opened this issue Oct 19, 2016 · 6 comments

Comments

@rzontar
Copy link

rzontar commented Oct 19, 2016

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Any config value set using the cli is treated as a string. Setting this config for strict-ssl (#841) is not honored and an unable to verify the first certificate error is raised. Setting the same value strict-ssl false in an .yarnrc results in a correct conversion.

If the current behavior is a bug, please provide the steps to reproduce.
yarn config set strict-ssl false
success Set "strict-ssl" to "false".

yarn config list
{ 'strict-ssl': 'false',
... }

What is the expected behavior?
yarn config set strict-ssl false
success Set "strict-ssl" to false.

yarn config list
{ 'strict-ssl': false,
... }

Please mention your node.js, yarn and operating system version.
node v6.7.0
yarn v0.16.0
Windows 10

@rapidia
Copy link

rapidia commented Oct 20, 2016

As a makeshift

$ yarn config set strict-ssl ""

@sebmck
Copy link
Contributor

sebmck commented Nov 1, 2016

Created #1590 to fix this, pending approval.

@sebmck sebmck closed this as completed Nov 1, 2016
@wesm87
Copy link

wesm87 commented Dec 5, 2016

It seems like this has been reintroduced in recent versions (I've had this issue with both 0.17.9 and 0.18.0). I took a quick look at the source code and it looks like the NpmRegistry class is using Registry.normalizeConfig() but the YarnRegistry class isn't:

https://github.com/yarnpkg/yarn/blob/master/src/registries/npm-registry.js#L124
https://github.com/yarnpkg/yarn/blob/master/src/registries/yarn-registry.js#L81

Could this be causing the issue?

@thebetterjort
Copy link

yarn config set strict-ssl ""
Is still required as of writing. You cannot do yarn config set strict-ssl false.

@amckibben
Copy link

I'm seeing the same behavior as @wesm87 and @thebetterjort in v0.18.1.

yarn config set strict-ssl false

results in the following in .yarnrc

strict-ssl "false"

@wesm87
Copy link

wesm87 commented Jan 13, 2017

Looks like there's an open PR for this now: #2440

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

6 participants