ion-cli
ion-cli copied to clipboard
`ion dump` cannot format a file inplace
I have a simple use case of formatting ion files in-place. I tried this via
ion dump --format pretty foo.ion -o foo.ion
which resulted in empty files.
It appears that this code here: https://github.com/amazon-ion/ion-cli/blob/master/src/bin/ion/commands/dump.rs#L54-L68 opens the file for writing before reading the file making a simple in-place format impossible.