hesperides icon indicating copy to clipboard operation
hesperides copied to clipboard

Improper handling of sub-mustaches, e.g. in @default annotations

Open Lucas-C opened this issue 7 years ago • 1 comments

Hi.

The following template content is a good example of this issue:

logs_dir={{logs_dir| @default /var/logs/{{hesperides.instance.name}}/toto}}
  • hesperides-gui does not trigger any warning

  • Hesperides internal template engine will not process the nested mustaches properly. It only "sees" one property here: {{logs_dir| @default /var/logs/{{hesperides.instance.name}}

  • if no value is provided, the final line will be :

    logs_dir=/var/logs/{{hesperides.instance.name}}/toto}}

Moreover, if one tries to workaround this by using quotes, hesperides-gui will raise an error and refuse to save this line:

logs_dir={{logs_dir| @default "/var/logs/{{hesperides.instance.name}}/toto"}}

Lucas-C avatar Mar 02 '17 15:03 Lucas-C

Vérifier si une exception est bien levée dans la v4

JMS: la fonctionnalité serait intéressante à avoir

Lucas-C avatar Feb 11 '19 16:02 Lucas-C