Closed loserMcloser closed 2 years ago
Thanks for the great bug report! I missed the truncate
flag when opening the file for the >
redirection, so it was actually overwriting just the first bytes instead of the whole file. I'll publish the fix asap.
Running the following hush script multiple times results in unexpected behaviour.
test.hsh
Run once
Run twice
Huh? Notice the time has changed, but now there are two copies of the array at the end of the file...?
Run three times
Again the time is changing in subsequent runs, but now there are three copies of the array appended after the third run.
Run three times with an extra append before the third
How did the "hi there" end up in the file? The file
test_file
should be completely overwritten each timetest.hsh
is run by the first line in the command block of the script.I'm really confused....