diff options
author | Teddy Wing | 2018-11-10 01:18:00 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-10 01:18:00 +0100 |
commit | 9c19f2ab86ed35b4e27b651dec3d2536344868e4 (patch) | |
tree | 1476ecd57cc99cd1aa3291a00680512eff37162b /license-generator/src/main.rs | |
parent | f4cf898ba755ee7feeb5994847d3575e74718cc1 (diff) | |
download | dome-key-web-9c19f2ab86ed35b4e27b651dec3d2536344868e4.tar.bz2 |
Add better messages on environment variable error
Otherwise it doesn't indicate the name of the environment variable in
the result output:
Error: Error(EnvVar(NotPresent), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })
Diffstat (limited to 'license-generator/src/main.rs')
-rw-r--r-- | license-generator/src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/license-generator/src/main.rs b/license-generator/src/main.rs index 5c1a0aa..d428af4 100644 --- a/license-generator/src/main.rs +++ b/license-generator/src/main.rs @@ -18,7 +18,8 @@ use license_generator::errors::*; use license_generator::purchaser::Purchaser; fn main() -> Result<()> { - let log_file_path = env::var("LOG_FILE")?; + let log_file_path = env::var("LOG_FILE") + .chain_err(|| "LOG_FILE environment variable not found")?; let log_file = OpenOptions::new() .append(true) |