From c0fd8d5e152c910b64c8d3536864d033d4ac9ffc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 13 Feb 2009 01:53:33 -0400 Subject: If a LEDGER_ envvar has no value, ignore it --- src/option.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/option.cc') diff --git a/src/option.cc b/src/option.cc index b45fc87b..1a68d2a8 100644 --- a/src/option.cc +++ b/src/option.cc @@ -126,7 +126,9 @@ void process_environment(const char ** envp, const string& tag, if (*q == '=') { try { - process_option(string(buf), scope, q + 1, string(*p, q - *p)); + string value = string(*p, q - *p); + if (! value.empty()) + process_option(string(buf), scope, q + 1, value); } catch (const std::exception& err) { add_error_context("While parsing environment variable option '" -- cgit v1.2.3