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 rust_users::*;
|
||||
use uucore;
|
||||
|
||||
#[test]
|
||||
fn test_invalid_option() {
|
||||
|
@ -104,7 +105,7 @@ fn test_reference() {
|
|||
// skip for root or MS-WSL
|
||||
// * MS-WSL is bugged (as of 2019-12-25), allowing non-root accounts su-level privileges for `chgrp`
|
||||
// * for MS-WSL, succeeds and stdout == 'group of /etc retained as root'
|
||||
if !(get_effective_gid() == 0 || is_wsl()) {
|
||||
if !(get_effective_gid() == 0 || uucore::os::is_wsl_1()) {
|
||||
new_ucmd!()
|
||||
.arg("-v")
|
||||
.arg("--reference=/etc/passwd")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue