]> git.lizzy.rs Git - rust.git/commitdiff
Exclude TERM env var by default
authorChristian Poveda <christianpoveda@protonmail.com>
Thu, 29 Aug 2019 09:07:20 +0000 (04:07 -0500)
committerChristian Poveda <christianpoveda@protonmail.com>
Thu, 29 Aug 2019 09:07:20 +0000 (04:07 -0500)
src/shims/env.rs

index 5a5dffa1d09b04b1a48fee875b6e95188c9f6e0e..d0b5abbaf181920ea2b15f4f94d38e9df264033c 100644 (file)
@@ -15,8 +15,10 @@ pub struct EnvVars {
 impl EnvVars {
     pub(crate) fn init<'mir, 'tcx>(
         ecx: &mut InterpCx<'mir, 'tcx, Evaluator<'tcx>>,
-        excluded_env_vars: Vec<String>,
+        mut excluded_env_vars: Vec<String>,
     ) {
+        // Exclude TERM var to avoid calls to the file system
+        excluded_env_vars.push("TERM".to_owned());
         if ecx.machine.communicate {
             for (name, value) in std::env::vars() {
                 if !excluded_env_vars.contains(&name) {