yii-dev-tool icon indicating copy to clipboard operation
yii-dev-tool copied to clipboard

Checkout only installed packages

Open xepozz opened this issue 3 years ago • 2 comments

When you want to reset all packages to master branch you get an errors

Package requirements repository is not cloned.
To fix, run the command:

  ./yii-dev install requirements

You can also disable the package in packages.local.php
See packages.local.php.example for configuration examples.

and the same for other not installed packages.

I expect when I do git/checkout master that will be checkout only installed packages.

xepozz avatar Nov 04 '20 18:11 xepozz

This is not actually a bug. This is a feature! =)

The tool tries to be as smart as possible, but there are several possible cases here:

  1. You want to checkout, but did not install the package.
  2. You want to checkout, but forgot to install the package before checkout.

These are different cases.

When I was creating the tool, I used the following logic:

  1. If you want to work with a specific package, you must explicitly specify it in the parameter list.
  2. If you want to work without specifying packages, you must either explicitly configure your package list using a local configuration file or your must install all packages at once.

And this logic is applied consistently across all yii-dev-tool commands.

Therefore, the existing behavior is correct. It kind of tells you: «Dude, there is something wrong with your configuration! Either disable this package in your local config, or install it.» :-)

rugabarbo avatar Dec 02 '20 14:12 rugabarbo

But, by the way, I see that now there are much more packages. More than one hundred ...

It may be more convenient if the base configuration won't offer all packages in a row for installation.

rugabarbo avatar Dec 07 '20 13:12 rugabarbo