Skip to content

Add shims for env var emulation in Windows #1225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 27, 2020
4 changes: 3 additions & 1 deletion src/shims/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ impl<'tcx> EnvVars<'tcx> {
) -> InterpResult<'tcx> {
let target_os = ecx.tcx.sess.target.target.target_os.as_str();
if target_os == "windows" {
// Exclude `TERM` var to avoid terminfo trying to open the termcap file.
// Temporary hack: Exclude `TERM` var to avoid terminfo trying to open the termcap file.
// Can be removed once Issue#1013(Implement file system access for Windows) is resolved.
excluded_env_vars.push("TERM".to_owned());
}

if ecx.machine.communicate {
for (name, value) in env::vars() {
if !excluded_env_vars.contains(&name) {
Expand Down