For example, if ++append is used instead of +append, instead of giving an error, it silently truncates the file.
$ onager prelaunch +arg --foo 1 2 +arg --bar a b +command "./examples/myscript" +jobname test
$ onager prelaunch +arg --foo 7 +arg --bar a b c +command "./examples/myscript" +jobname test ++append
$ cat .onager/scripts/test/jobs.json
Expected output:
{
"1": ["./examples/myscript --foo 1 --bar a --tag test_1__foo_1__bar_a", "test_1__foo_1__bar_a"],
"2": ["./examples/myscript --foo 1 --bar b --tag test_2__foo_1__bar_b", "test_2__foo_1__bar_b"],
"3": ["./examples/myscript --foo 2 --bar a --tag test_3__foo_2__bar_a", "test_3__foo_2__bar_c"],
"4": ["./examples/myscript --foo 2 --bar b --tag test_4__foo_2__bar_b", "test_4__foo_2__bar_c"],
"5": ["./examples/myscript --foo 7 --bar a --tag test_5__foo_7__bar_a", "test_5__foo_7__bar_a"],
"6": ["./examples/myscript --foo 7 --bar b --tag test_6__foo_7__bar_b", "test_6__foo_7__bar_b"],
"7": ["./examples/myscript --foo 7 --bar c --tag test_7__foo_7__bar_c", "test_7__foo_7__bar_c"]
}
Actual output:
{
"1": ["./examples/myscript --foo 7 --bar a --tag test_1__foo_7__bar_a", "test_1__foo_7__bar_a"],
"2": ["./examples/myscript --foo 7 --bar b --tag test_2__foo_7__bar_b", "test_2__foo_7__bar_b"],
"3": ["./examples/myscript --foo 7 --bar c --tag test_3__foo_7__bar_c", "test_3__foo_7__bar_c"]
}
For example, if
++append
is used instead of+append
, instead of giving an error, it silently truncates the file.Expected output:
Actual output: