-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Do you want to request a feature or report a bug?
Bug.
What is the current behavior?
When the workspaces
definition contains a trailing slash, running e. g. yarn workspaces info
in the root works just as expected. But when you cd
into the workspace folder and run yarn workspaces info
, it fails because it cannot detect that that folder is a workspace.
If the current behavior is a bug, please provide the steps to reproduce.
- Create a new project directory.
- Create a subdirectory called
package
. yarn init
insidepackage/
.yarn init
in the root.- Add
package/
(with trailing slash) as a workspace to the rootpackage.json
.... "workspaces": { "packages": [ "package/" ], }, ...
- Run
yarn workspaces info
in the root. => Outputs workspace list correctly. - Run
yarn workspaces info
inpackage/
. => Fails withyarn workspaces v1.6.0 error Cannot find the root of your workspace - are you sure you're currently in a workspace? info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command.
What is the expected behavior?
Running yarn workspaces info
should output the workspaces when run both inside root and package/
.
If this behavior is intended, the documentation could reflect the reason why.
Please mention your node.js, yarn and operating system version.
Node v8.11.1
Yarn v1.6.0
Ubuntu 16.04 LTS