User story #12841
openFile_content behaviour without enforce behaviour is error prone
Description
When the "ensure" field is set to "false", the GM does not take the duplicates lines into account, except if the file is empty or does not exist.
Here are some examples to make it more explicit:
chi
chi
will resolves in
chi
chi
if the file is empty or undefined at run start,
Now we can remove one of the 2 lines of the file, run the agent and the file will not be updated.
Same goes for ordering.
If I make a file with the following content:
chi
fu
mi
And apply a GM with the false mode on it with the following content:
mi
fu
chi
It will not update the file when the same GM with "true" mode will rewrite the file to update the ordering.
This behaviour is very deceptive and should be, at least, more explicit in the documentation since the GM name does not make mention at all of
a line by line interpretation.
Moreover I can not see the difference between this GM in "false" mode and the "File lines present" one.