Revert "fix(watch): warn and ignore missing directories"
This reverts commit e145df39bf
.
This commit is contained in:
parent
a9f089f65d
commit
c4a7e9df8e
19
src/watch.rs
19
src/watch.rs
|
@ -1,7 +1,6 @@
|
|||
use anyhow::{bail, Result};
|
||||
use anyhow::{Context, Result};
|
||||
use serde::Deserialize;
|
||||
use std::io::ErrorKind;
|
||||
use tracing::{error, trace};
|
||||
use tracing::trace;
|
||||
use watchman_client::{prelude::*, Subscription};
|
||||
|
||||
use crate::config::Bucket;
|
||||
|
@ -24,17 +23,9 @@ pub async fn generate_subscriptions<'a>(
|
|||
}
|
||||
let mut subs = vec![];
|
||||
for path in &bucket.sources {
|
||||
let canonical_path = match CanonicalPath::canonicalize(path) {
|
||||
Ok(path) => path,
|
||||
Err(err) => {
|
||||
if err.kind() == ErrorKind::NotFound {
|
||||
error!("Directory {} not found, ignoring...", path.display());
|
||||
continue;
|
||||
}
|
||||
bail!(err)
|
||||
}
|
||||
};
|
||||
let resolved = client.resolve_root(canonical_path).await?;
|
||||
let resolved = client
|
||||
.resolve_root(CanonicalPath::canonicalize(path).context(format!("{}", path.display()))?)
|
||||
.await?;
|
||||
trace!(
|
||||
"Adding subscription for {}",
|
||||
resolved.path().as_path().display()
|
||||
|
|
Loading…
Reference in New Issue