VeryGoodOpenSource / very_good_cli

A Very Good Command-Line Interface for Dart created by Very Good Ventures 🦄
http://cli.vgv.dev
MIT License
2.19k stars 195 forks source link

fix: packages get --ignore does work with "example" #1118

Open alestiago opened 2 months ago

alestiago commented 2 months ago

Description

Running:

very_good packages get -r --ignore example

Gets dependencies on the example directory.

Steps To Reproduce

  1. Activate Very Good CLI:
dart pub global activate very_good_cli
  1. Create a flutter package:
very_good create flutter_package my_package
  1. Create an example package inside my_package (from my_package):
flutter create example --platforms web
  1. Cleanmy_package/example (from my_package/example):
flutter clean && rm -rf pubspec.lock

Observe that build/, .dart_tool/ and pubspec.lock within examples are no longer existent.

  1. Get dependencies (from my_package)
very_good packages get -r --ignore example
  1. See that my_package/example has now build/, .dart_tool/ and pubspec.lock within the example directory meaning the tool run a pub get.

The logger only notifies:

✓ Running "flutter pub get" in .  (1.9s)

Expected Behavior There is no pub get on the example directory when provided through ignore.

Additional Context There is a hidden --no-example command that might be applicable.