diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-08-15 15:27:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 15:27:45 -0400 |
commit | c069d0da7645eb1e596a53178960149224af8d48 (patch) | |
tree | 4f69e4ec146bbbae85f64207fac795b03060cd59 /src/ini.c | |
parent | cc5fa8b386200cce03ef8a081acccc92dc44ddfb (diff) | |
download | stasis-c069d0da7645eb1e596a53178960149224af8d48.tar.gz |
Add template convience functions (and bug fixes) (#29)
* Die when render variable is NULL
* This was caught when a call to {{ func:xyz() }} lacked opening/closing parenthesis
* Scripts in tests should only render template strings right before execution
* Remove conda version pin
* This avoids updating conda in the base environment
* This also avoids pitfalls associated with newly released (always broken) versions of conda
* Add two template convenience functions
* get_junitxml_result_auto()
* get_basetemp_result_auto()
* Handle rendering error for test script
* Rename functions
* get_junitxml_result_auto -> junitxml_file
* get_basetemp_result_auto -> basetemp_dir
* Thank you, @zacharyburnett
Diffstat (limited to 'src/ini.c')
-rw-r--r-- | src/ini.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -451,6 +451,11 @@ int ini_write(struct INIFILE *ini, FILE **stream, unsigned mode) { render = parts[p]; } + if (!render) { + SYSERROR("%s", "rendered string value can never be NULL!\n"); + return -1; + } + if (*hint == INIVAL_TYPE_STR_ARRAY) { int leading_space = isspace(*render); if (leading_space) { |