diff --git a/crates/nu-command/tests/commands/open.rs b/crates/nu-command/tests/commands/open.rs index f2ef3b593e..726adfe316 100644 --- a/crates/nu-command/tests/commands/open.rs +++ b/crates/nu-command/tests/commands/open.rs @@ -214,12 +214,11 @@ fn errors_if_file_not_found() { cwd: "tests/fixtures/formats", "open i_dont_exist.txt" ); - - #[cfg(windows)] - let expected = "The system cannot find the file specified. (os error 2)"; - - #[cfg(not(windows))] - let expected = "No such file or directory (os error 2)"; + // Common error code between unixes and Windows for "No such file or directory" + // + // This seems to be not directly affected by localization compared to the OS + // provided error message + let expected = "(os error 2)"; assert!( actual.err.contains(expected),