Commit 6f13ed3f authored by Christoffer Ackelman's avatar Christoffer Ackelman

Added warning when co_dcli_file fails to resolve an environment variable.

parent fbcea5c4
...@@ -177,6 +177,9 @@ int dcli_replace_env(const char* str, char* newstr) ...@@ -177,6 +177,9 @@ int dcli_replace_env(const char* str, char* newstr)
cdh_ToLower(lower_symbol, symbol); cdh_ToLower(lower_symbol, symbol);
if ((value = getenv(lower_symbol)) == NULL) { if ((value = getenv(lower_symbol)) == NULL) {
/* It was no symbol */ /* It was no symbol */
if (strncmp(str, "$pwr", 4) == 0) {
fprintf(stderr, "Warning! Could not resolve environment variable $%s\n", lower_symbol);
}
*t = *s; *t = *s;
t++; t++;
} else { } else {
...@@ -206,6 +209,9 @@ int dcli_replace_env(const char* str, char* newstr) ...@@ -206,6 +209,9 @@ int dcli_replace_env(const char* str, char* newstr)
cdh_ToLower(lower_symbol, symbol); cdh_ToLower(lower_symbol, symbol);
if ((value = getenv(lower_symbol)) == NULL) { if ((value = getenv(lower_symbol)) == NULL) {
/* It was no symbol */ /* It was no symbol */
if (strncmp(str, "$pwr", 4) == 0) {
fprintf(stderr, "Warning! Could not resolve environment variable $%s\n", lower_symbol);
}
*t = 0; *t = 0;
} else { } else {
/* Symbol found */ /* Symbol found */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment