diff --git a/xtasks/crates/config/src/main.rs b/xtasks/crates/config/src/main.rs index 85320c1..10f1c3f 100644 --- a/xtasks/crates/config/src/main.rs +++ b/xtasks/crates/config/src/main.rs @@ -75,8 +75,14 @@ fn ask_confirmation(prompt: &str) -> bool { } fn run_load_preset(preset_name: &str, no_confirm: bool, current_dir: &Path) -> Result<(), Error> { - // Load the preset file from the `presets/` directory. - let preset_path = PathBuf::from("presets").join(format!("{preset_name}.toml")); + // Load the file, or get it from the `presets/` directory + let pb = PathBuf::from(preset_name); + let preset_path = if pb.is_file() { + pb + } else { + PathBuf::from("presets").join(format!("{preset_name}.toml")) + }; + let preset = config::load_toml(&preset_path)?; let config_path = current_dir.join(".cargo/config.toml");