We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
the documentation in this page https://mikefarah.gitbook.io/yq/commands/evaluate-all#examples says that the --inplace option will change the first yaml file given
--inplace
my observations show otherwise, here it's the second file, so I presume it's the last one
/tmp # yq --version yq (https://github.com/mikefarah/yq/) version 4.24.5 /tmp # cat > a.yaml a: 1 /tmp # cat > b.yaml b: 2 /tmp # ls -l a.yaml b.yaml -rw-r--r-- 1 root root 5 Apr 22 15:35 a.yaml -rw-r--r-- 1 root root 5 Apr 22 15:35 b.yaml /tmp # yq ea a.yaml b.yaml a: 1 --- b: 2 /tmp # yq --inplace ea a.yaml b.yaml /tmp # ls -l a.yaml b.yaml -rw-r--r-- 1 root root 5 Apr 22 15:35 a.yaml -rw-r--r-- 1 root root 14 Apr 22 15:35 b.yaml /tmp #
The text was updated successfully, but these errors were encountered:
Yep, I can replicate this! It looks like it happens when no expression is passed in. Will fix.
Sorry, something went wrong.
Fixes bug when using inplace with no expression and multiple files #1193
3ad5355
FTR my actual use case is with using --from-file - so here again no expression passed on the command line, maybe that's a more accurate description ?
--from-file
in any case please make sure to advertise if the behaviour changes as it will then break my current code ;)
thanks !
Fixed in 4.25.1 - the first file is now updated correctly!
No branches or pull requests
the documentation in this page
https://mikefarah.gitbook.io/yq/commands/evaluate-all#examples
says that the
--inplace
option will change the first yaml file givenmy observations show otherwise, here it's the second file, so I presume it's the last one
The text was updated successfully, but these errors were encountered: