Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: unknown command for all commands #1158

Closed
trampster opened this issue Mar 28, 2022 · 7 comments
Closed

Error: unknown command for all commands #1158

trampster opened this issue Mar 28, 2022 · 7 comments
Labels

Comments

@trampster
Copy link

trampster commented Mar 28, 2022

yq doesn't seem to recognise any commands

yq '.a.b.c' sample.yaml
Error: unknown command ".a.b.c" for "yq"
yq '.a.b.c = "fred"' sample.yaml
Error: unknown command ".a.b.c = \"fred\"" for "yq"

Version of yq: version 4.14.1
Operating system: alphine linux (docker container)
Installed via: apk

@trampster
Copy link
Author

trampster commented Mar 28, 2022

I thought maybe despite the reported version it was somehow using the V3 vesion. .However the V3 commands don't work either.

@mikefarah
Copy link
Owner

Sorry for the confusion, prior to v4.18.x you must specify the 'eval (e) or eval-all (ea)' command. In 4.18+ 'e' became the default.

See https://github.com/mikefarah/yq/#notice-for-v4x-versions-prior-to-4181 for more details.

@trampster
Copy link
Author

Oh I guess you don't follow simver, this is a breaking change without the major version rolling

@mikefarah
Copy link
Owner

IMO It's not a breaking change as it's fully backwards compatible. The old commands still work as they were documented. It's a new feature that only works with new versions.

Just like any other new features I add to yq - they're only available in the new versions.

Again, apologies for the confusion.

@GuyPaddock
Copy link

GuyPaddock commented Feb 10, 2023

@mikefarah Your statement does not make sense. None of the documented commands for 4.x work with versions of 4.x before 4.18, and none of the documented commands for 3.x work with the 4.x version. So... what documentation are you referring to?

Could you add a note to the top of all the 4.x documentation that states it only applies to versions after 4.18? There's no version selector that would enable someone to show only docs for 4.0 to 4.18, and the version in Ubuntu LTS from the PPA in the docs (ppa:rmescandon/yq) is 4.16.2, so we run into this issue ALL the time and there is nothing in docs about it.

@dbsanfte
Copy link

dbsanfte commented Mar 12, 2024

So much time lost to this nonsense, again, in 2024. Please update the docs with separate pages for 4.x<4.18 and 4.18+

@aryangosling
Copy link

Use 4.44 or a newer version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants