fix(core): canonicalize watch event paths on all linux distros (#19848)
Co-authored-by: Jason Jean <jasonjean1993@gmail.com>
This commit is contained in:
parent
900c1c9b37
commit
a7e0abd3e4
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -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"
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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<T: AsRef<str>>(root: T) -> Vec<IgnoreFile> {
|
||||
// .collect()
|
||||
// }
|
||||
|
||||
static OS_PLATFORM: Lazy<OSInformation> = Lazy::new(os_type::current_platform);
|
||||
|
||||
pub(super) fn transform_event(watch_event: &Event) -> Option<Event> {
|
||||
if OS_PLATFORM.os_type == OSType::Debian || OS_PLATFORM.os_type == OSType::Arch {
|
||||
if cfg!(linux) {
|
||||
let tags = watch_event
|
||||
.tags
|
||||
.clone()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user