sindresorhus / npm-name-cli

Check whether a package or organization name is available on npm
MIT License
284 stars 26 forks source link

`npm-name @org-name` is not working #31

Open RobertSandiford opened 5 months ago

RobertSandiford commented 5 months ago
PS C:\> npm-name chalk
✖ chalk (​https://www.npmjs.com/package/chalk​) is unavailable
PS C:\> npm-name @chalk
Specify one or more package names
PS C:\> npm-name @chalk/chalk
✔ @chalk/chalk is available

I expected to get a result with npm-name @chalk.

npm-name-cli@5.0.0

sindresorhus commented 5 months ago

Works fine for me:

❯ npm-name @chalk
✖ @chalk is unavailable

Maybe try quoting @chalk.

RobertSandiford commented 5 months ago

Yeah double quotes works. I guess @ is a special character in PowerShell: https://stackoverflow.com/questions/363884/what-does-the-symbol-do-in-powershell

Maybe add a note to the readme?

Edit: singles or doubles are OK here:

PS C:\> npm-name "@chalk"
✖ @chalk (​https://www.npmjs.com/org/chalk​) is unavailable
PS C:\> npm-name '@chalk'
✖ @chalk (​https://www.npmjs.com/org/chalk​) is unavailable
PS C:\> npm-name `@chalk`
AggregateError