In cmd.exe, I try to append WSL2 output to some file, like this:
C:\somepath>echo Some contents> somefile
C:\somepath>bash.exe --noprofile --norc -c "echo APPEND">> somefile
Processing fstab with mount -a failed.
C:\somepath>type somefile
APPEND
ntents
C:\somepath>
As you can see, somehow the output is not appended to the file but overwrites the start of the file. I cannot imagine this is by design somehow.
It only happens with WSL or Bash, not with regular commands of course. But I would expect cmd to be responsible for writing to the correct place. What is so special about WSL output?
The "Processing fstab with mount -a failed." is a line I see with every WSL invocation. I don't think it's related...?