diff --git a/Cargo.lock b/Cargo.lock index 8c9bdb1c93cec..c65ed25ea88b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1353,7 +1353,6 @@ dependencies = [ "napi-build", "napi-derive", "once_cell", - "os_type", "parking_lot", "rayon", "regex", @@ -1380,15 +1379,6 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -[[package]] -name = "os_type" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24d44c0eea30167516ed8f6daca4b5e3eebcde1bde1e4e6e08b809fb02c7ba5" -dependencies = [ - "regex", -] - [[package]] name = "overload" version = "0.1.1" diff --git a/packages/nx/Cargo.toml b/packages/nx/Cargo.toml index 2888a42e65d50..9b8d54cd9ca45 100644 --- a/packages/nx/Cargo.toml +++ b/packages/nx/Cargo.toml @@ -14,7 +14,6 @@ ignore = '0.4' ignore-files = "1.3.0" itertools = "0.10.5" once_cell = "1.18.0" -os_type = "2.6.0" parking_lot = { version = "0.12.1", features = ["send_guard"] } napi = { version = '2.12.6', default-features = false, features = [ 'anyhow', diff --git a/packages/nx/src/native/watch/utils.rs b/packages/nx/src/native/watch/utils.rs index 968cd60d01216..e511f7e4578c9 100644 --- a/packages/nx/src/native/watch/utils.rs +++ b/packages/nx/src/native/watch/utils.rs @@ -1,7 +1,5 @@ use ignore::WalkBuilder; use ignore_files::IgnoreFile; -use once_cell::sync::Lazy; -use os_type::{OSInformation, OSType}; use std::{fs, path::PathBuf}; use tracing::trace; use watchexec_events::{Event, Tag}; @@ -56,10 +54,8 @@ pub(super) fn get_ignore_files>(root: T) -> Vec { // .collect() // } -static OS_PLATFORM: Lazy = Lazy::new(os_type::current_platform); - pub(super) fn transform_event(watch_event: &Event) -> Option { - if OS_PLATFORM.os_type == OSType::Debian || OS_PLATFORM.os_type == OSType::Arch { + if cfg!(linux) { let tags = watch_event .tags .clone()