From 1c5a625ad0303e2407c8ab83ea7d37795e69a3a5 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Wed, 26 Jun 2024 01:18:15 +0700 Subject: [PATCH] fix: Fix wrong `cfg(linux)` --- clap_complete/tests/testsuite/common.rs | 2 +- clap_complete_nushell/tests/common.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clap_complete/tests/testsuite/common.rs b/clap_complete/tests/testsuite/common.rs index f5fe9313d0b..3534344bf12 100644 --- a/clap_complete/tests/testsuite/common.rs +++ b/clap_complete/tests/testsuite/common.rs @@ -430,7 +430,7 @@ pub(crate) fn has_command(command: &str) -> bool { Ok(output) => output, Err(e) => { // CI is expected to support all of the commands - if is_ci() && cfg!(linux) { + if is_ci() && cfg!(target_os = "linux") { panic!( "expected command `{}` to be somewhere in PATH: {}", command, e diff --git a/clap_complete_nushell/tests/common.rs b/clap_complete_nushell/tests/common.rs index 871a8baf419..9ed9b5ba82d 100644 --- a/clap_complete_nushell/tests/common.rs +++ b/clap_complete_nushell/tests/common.rs @@ -374,7 +374,7 @@ pub(crate) fn has_command(command: &str) -> bool { Ok(output) => output, Err(e) => { // CI is expected to support all of the commands - if is_ci() && cfg!(linux) { + if is_ci() && cfg!(target_os = "linux") { panic!( "expected command `{}` to be somewhere in PATH: {}", command, e