mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
wsl2: wsl no longer differs in output
refactor `is_wsl` to `is_wsl_1` and `is_wsl_2` On my tests with wsl2 ubuntu2004 all tests pass without special cases I moved wsl detection into uucore so that it can be shared instead of duplicated I moved `parse_mode` into uucode as it seemed to fit there better and anyway requires libc feature
This commit is contained in:
parent
cc4f32d87a
commit
b1fcb621a8
11 changed files with 84 additions and 84 deletions
|
@ -1,5 +1,6 @@
|
|||
use crate::common::util::*;
|
||||
use std::env;
|
||||
use uucore;
|
||||
|
||||
#[test]
|
||||
fn test_normal() {
|
||||
|
@ -13,7 +14,7 @@ fn test_normal() {
|
|||
for (key, value) in env::vars() {
|
||||
println!("{}: {}", key, value);
|
||||
}
|
||||
if (is_ci() || is_wsl()) && result.stderr.contains("error: no login name") {
|
||||
if (is_ci() || uucore::os::is_wsl_1()) && result.stderr.contains("error: no login name") {
|
||||
// ToDO: investigate WSL failure
|
||||
// In the CI, some server are failing to return logname.
|
||||
// As seems to be a configuration issue, ignoring it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue