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 global list isn't supported #3620

Closed
sarupbanskota opened this issue Jun 10, 2017 · 7 comments
Closed

yarn global list isn't supported #3620

sarupbanskota opened this issue Jun 10, 2017 · 7 comments

Comments

@sarupbanskota
Copy link

sarupbanskota commented Jun 10, 2017

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

What is the current behavior?

$ yarn global ls                             1 ↵
yarn global v0.24.5
warning No license field
✨  Done in 0.06s.
$ yarn global list                           1 ↵
yarn global v0.24.5
error Invalid subcommand. Try "add, bin, ls, remove, upgrade, upgrade-interactive"
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

What is the expected behavior?

the same as yarn global ls

also based on what the website says, it sounds like list should be supported as a yarn subcommand.
https://yarnpkg.com/lang/en/docs/cli/global/

Read more about the commands that can be used together with yarn global:

yarn add: add a package to use in your current package.
yarn bin: displays the location of the yarn bin folder.
yarn list: list installed packages.
yarn remove: remove a package that will no longer be used in your current package.
yarn upgrade: upgrades packages to their latest version based on the specified range.

Please mention your node.js, yarn and operating system version.
yarn version v0.24.5, node 8

@rockchalkwushock
Copy link

@sarupbanskota

How do you have your PATH setup? This will matter with where yarn global ls is looking at. You can refer to #630. I also made note of what this says in this gist. You'll have to scroll down to the bit about yarn. Hope this is what the issue is an you can get it working 👍

@robsonrosa
Copy link

@rockchalkwushock I'm not sure if its related with current PATH setup. The documentation itself is ambiguos. At the first paragraph we have:

yarn global is a prefix used for a number of commands like add, bin, ls and remove.

And at the "read more" section, the command list changes to:

Read more about the commands that can be used together with yarn global:
yarn add: add a package to use in your current package.
yarn bin: displays the location of the yarn bin folder.
yarn list: list installed packages.
yarn remove: remove a package that will no longer be used in your current package.
yarn upgrade: upgrades packages to their latest version based on the specified range.

So, locally we should use yarn list and globally yarn global ls. And it's pretty confusing to me.

@sarupbanskota
Copy link
Author

yeah, what @robsonrosa said, basically :-)

I'm happy to send a PR if y'all think it makes sense, although that would be my first and will probably take a short while ;)

@rockchalkwushock
Copy link

@sarupbanskota @robsonrosa

I see my mistake I saw your code snippet and thought you were not able to get yarn global ls to work. I agree this should either be a sub-command or ls should be the pattern used between local and global use of yarn.

@sarupbanskota
Copy link
Author

sarupbanskota commented Jun 10, 2017

Personally I think list reads better, but ls is more unix-like.

Why don't we support both, that way we aren't breaking the experience for somebody who's gotten used to either approaches?

As far as documentation goes, we could specify a preferred way.


we could do a 👍 for list, ❤️ for ls

(... just kidding)

@kaylie-alexa
Copy link
Member

This is fixed with 26.0.0 release.

@sarupbanskota
Copy link
Author

Wow that was faast @kaylieEB - thanks!

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

5 participants