Closed MathieuAA closed 4 years ago
By the way, thanks for the article!
@MathieuAA apologies for the late reply on this. Would definitely merge a PR that fixes this, and seems the solution is just to disable detection? Would be happy to land it.
I'm not sure on translating the https:
to HTTPS
because I'm not convinced it will be easier to understand. Did it confuse you? what will we do with other protocol schemes like git+ssh:
?
As there's a finite set of possible protocols, formatting them shouldn't be too big a deal. Frankly, just for that, it's not worth adding the formatting. Fixing the test is more important. I won't be able to do it til tomorrow. The fix stays the same, if you wanna do it before tomorrow, by all means.
@MathieuAA no rush on my side so when you get to it in the upcoming week that's fine
I can do a PR for the issue if you want.
Expected Behavior
The tests should pass when cloning & installing the project.
Current Behavior
They do not. See:
That's because my locale is set to the french one, and yargs translates the CLI output (at least some of it) (See https://github.com/yargs/yargs/blob/master/docs/api.md#detectlocaleboolean Your tests rely on the fact that the user has an english locale.
See the output of the
npx lockfile-lint -h
command:Notice the
Exemples
stringPossible Solution
Adding
to the lockfile-lint/src.main.js file works.
Steps to Reproduce (for bugs)
Well, I don't know how to set my locale to another, but I guess https://www.tecmint.com/set-system-locales-in-linux/ should help
Context
I was trying to improve the output of the expected protocol; I've tried to analyze one of my project's lockfile and I was surprised at the output (I expected
HTTPS
, nothttps:
, do you want to a PR for that?)Your Environment
Ubuntu LTS, french locale
The output of the
locale
command.