Skip to content

Commit afc76aa

Browse files
committed
test(compile): remove related env vars to avoid unexpected behavior
1 parent fab2291 commit afc76aa

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/compile.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ fn run_cmd(cmd: &str) -> Result<String, String> {
1616
let full_cmd = format!("run --features compiler -- {}", cmd);
1717
let args = shlex::split(&full_cmd).unwrap();
1818

19-
let output = Command::new("cargo").args(args).output().unwrap();
19+
let output = Command::new("cargo")
20+
.args(args)
21+
.env_remove("NETWORK")
22+
.env_remove("DATADIR")
23+
.env_remove("POLICY")
24+
.env_remove("TYPE")
25+
.output()
26+
.unwrap();
27+
2028
let stdout = String::from_utf8_lossy(&output.stdout).to_string();
2129
let stderr = String::from_utf8_lossy(&output.stderr).to_string();
2230

0 commit comments

Comments
 (0)