Skip to content

Commit

Permalink
feat: ✨ Add hint about .nurscripts has moved to .nur/scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ddanier committed Mar 18, 2024
1 parent 21d3a74 commit ace3586
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ fn main() -> Result<ExitCode, miette::ErrReport> {
eprintln!("nur config path: {:?}", nur_config_dir);
}

// Give some hints if old ".nurscripts" exists
let old_nur_lib_path = project_path.join(".nurscripts");
if old_nur_lib_path.exists() && old_nur_lib_path.is_dir() {
eprintln!(
"{}WARNING: .nurscripts/ has moved to .nur/scripts/ -> please update your project{}",
if use_color {
Color::Red.prefix().to_string()
} else {
String::from("")
},
if use_color {
Color::Red.suffix().to_string()
} else {
String::from("")
},
);
}

// Set default scripts path
let mut nur_lib_dir_path = nur_config_dir.clone();
nur_lib_dir_path.push(NUR_CONFIG_LIB_PATH);
Expand Down

0 comments on commit ace3586

Please sign in to comment.