fix: Expand undefined vars to empty string

Bugs (fixed):
  * Md shared memory file names have unexpanded variable: '${BTS_SHARED_MEMORY_PREFIX}'
This commit is contained in:
John Colvin committed 2024-10-14 15:51:44 +00:00
1 parent 5e62b42404
commit 8cd2bb3d49
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -668,6 +668,7 @@ std::string expand_env(std::string name, bool assert_vars_exist) {
bts_assert_msgf(
!assert_vars_exist, "Environment variable '{}' is undefined",
std::string{name});
name.replace(from.first, from.second, "");
continue;
}
name.replace(from.first, from.second, var);