From abc27593554d2fcaaf2eadae36a1f3a588698ca4 Mon Sep 17 00:00:00 2001 From: Edouard Oger Date: Tue, 24 Mar 2020 10:32:44 -0400 Subject: [PATCH] Ignore SCCACHE_ERROR_LOG when empty --- src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.rs b/src/commands.rs index df573f751..c46b67e96 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -135,7 +135,7 @@ fn redirect_stderr(f: File) -> Result<()> { /// If `SCCACHE_ERROR_LOG` is set, redirect stderr to it. fn redirect_error_log() -> Result<()> { let name = match env::var("SCCACHE_ERROR_LOG") { - Ok(filename) => filename, + Ok(filename) if !filename.is_empty() => filename, _ => return Ok(()), }; let f = OpenOptions::new().create(true).append(true).open(name)?;