dart-lang / homebrew-dart

Dart team's official tap for homebrew.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update Existing Global Packages on Update of Dart

mohammed90 opened this issue · comments

Dart programs installed with pub global activate will not work after updates of Dart, complaining about kernel incompatibility. The fix is to do pub global activate {{package}} after every Dart update. It is less of a hassle for the end-user/developer to have them auto-updated once Dart is updated.

For posterity, I've been using this one-liner after Dart updates to update all installed global packages:

dart pub global list | awk '{system("dart pub global activate " $1)}'