You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The --help documentation says that it's possible to update in place using the -i flag:
-h, --help show this help message and exit
--toml-output, -t Transcode jq JSON output back into TOML and emit it
--in-place, -i Edit files in place (no backup - use caution)
But when invoked I get an error:
tomlq: -i/--in-place can only be used with -y/-Y
Which seems to suggest that only yaml files can be updated in-place.
I ended up using the sponge utility from the moreutils package: tomlq --toml-output '<query>' Foo.toml | sponge Foo.toml. But since tomlq already knows how to return toml output it would seem rather straight-forward to make the -i flag work the same way it works with yq.
The text was updated successfully, but these errors were encountered:
Correct, sponge is the right utility to use in this case. jq does not support -i, so -i is only available when we are capturing and converting jq's output.
Version: tomlq 2.12.2
The
--help
documentation says that it's possible to update in place using the-i
flag:But when invoked I get an error:
Which seems to suggest that only
yaml
files can be updated in-place.I ended up using the
sponge
utility from themoreutils
package:tomlq --toml-output '<query>' Foo.toml | sponge Foo.toml
. But sincetomlq
already knows how to return toml output it would seem rather straight-forward to make the-i
flag work the same way it works withyq
.The text was updated successfully, but these errors were encountered: