We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61ed2a2 commit a841469Copy full SHA for a841469
crates/uv-settings/src/lib.rs
@@ -2,7 +2,7 @@ use std::env;
2
use std::ops::Deref;
3
use std::path::{Path, PathBuf};
4
5
-use tracing::debug;
+use tracing::{debug, warn};
6
7
use uv_fs::Simplified;
8
use uv_static::EnvVars;
@@ -241,7 +241,14 @@ fn system_config_file() -> Option<PathBuf> {
241
// Fallback to `/etc/uv/uv.toml` if `XDG_CONFIG_DIRS` is not set or no valid
242
// path is found.
243
let candidate = Path::new("/etc/uv/uv.toml");
244
- candidate.is_file().then(|| candidate.to_path_buf())
+ match candidate.try_exists() {
245
+ Ok(true) => Some(candidate.to_path_buf()),
246
+ Ok(false) => None,
247
+ Err(err) => {
248
+ warn!("Failed to query system configuration file: {err}");
249
+ None
250
+ }
251
252
}
253
254
0 commit comments