rcrowley / mustache.sh

Mustache in POSIX shell
Other
81 stars 8 forks source link

Handle strict unbound checking (set -u) #6

Closed jklukas closed 5 years ago

jklukas commented 9 years ago

I was running mustache in a script with set -u enabled, leading mustache to throw errors about unbound variables. By setting default values for two variables, it can handle this case.

This is difficult to add a test for.

I believe the default assignment parameter expansion is POSIX compliant, but could be missing some nuance.