File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -282,9 +282,8 @@ environment variable. We first document the most relevant and most commonly used
282282 verbose. `hide` hides the warning entirely.
283283* `-Zmiri-env-exclude=<var>` keeps the `var` environment variable isolated from the host so that it
284284 cannot be accessed by the program. Can be used multiple times to exclude several variables. The
285- ` TERM` environment variable is excluded by default to [speed up the test
286- harness](https://github.com/rust-lang/miri/issues/1702). This has no effect unless
287- ` -Zmiri-disable-isolation` is also set.
285+ ` TERM` environment variable is excluded by default in Windows to prevent the libtest harness from
286+ accessing the file system. This has no effect unless `-Zmiri-disable-isolation` is also set.
288287* `-Zmiri-env-forward=<var>` forwards the `var` environment variable to the interpreted program. Can
289288 be used multiple times to forward several variables. This takes precedence over
290289 `-Zmiri-env-exclude` : if a variable is both forwarded and exluced, it *will* get forwarded. This
Original file line number Diff line number Diff line change 1- 1f5d8d49eb6111931091f700d07518cd2b80bc18
1+ 93ab13b4e894ab74258c40aaf29872db2b17b6b4
Original file line number Diff line number Diff line change @@ -42,10 +42,11 @@ impl<'tcx> EnvVars<'tcx> {
4242 config : & MiriConfig ,
4343 ) -> InterpResult < ' tcx > {
4444 let target_os = ecx. tcx . sess . target . os . as_ref ( ) ;
45- // HACK: Exclude `TERM` var to avoid terminfo trying to open the termcap file.
46- // This is (a) very slow and (b) does not work on Windows.
4745 let mut excluded_env_vars = config. excluded_env_vars . clone ( ) ;
48- excluded_env_vars. push ( "TERM" . to_owned ( ) ) ;
46+ if target_os == "windows" {
47+ // HACK: Exclude `TERM` var to avoid terminfo trying to open the termcap file.
48+ excluded_env_vars. push ( "TERM" . to_owned ( ) ) ;
49+ }
4950
5051 // Skip the loop entirely if we don't want to forward anything.
5152 if ecx. machine . communicate ( ) || !config. forwarded_env_vars . is_empty ( ) {
You can’t perform that action at this time.
0 commit comments