subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.28k stars 202 forks source link

Support older yq versions #329

Closed ThomasAunvik closed 1 week ago

ThomasAunvik commented 1 month ago

For some reason, Ubuntu has their latest version to 4.16.2, and that version of yq doesn't use eval by default as it does with the newer versions.

https://mikefarah.gitbook.io/yq#notice-for-v4.x-versions-prior-to-4.18.1

Old 4.16.2:

~$ yq --version
yq (https://github.com/mikefarah/yq/) version 4.16.2

~$ yq '.environment.flutter' pubspec.yaml
Error: unknown command ".environment.flutter" for "yq"
Run 'yq --help' for usage.

~$ yq eval '.environment.flutter' pubspec.yaml 
3.24.4

New version

~$ yq --version
yq (https://github.com/mikefarah/yq/) version v4.44.2
~$ yq '.environment.flutter' pubspec.yaml 
3.24.4
~$ yq eval '.environment.flutter' pubspec.yaml 
3.24.4

One info, latest version of yq is able to be installed trough snap :/

bartekpacia commented 1 week ago

Hey, thanks!