Exclude TERM env var by default

This commit is contained in:
Christian Poveda 2019-08-29 04:07:20 -05:00
parent ee8afead51
commit 9c54368cca

View 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) {