mirror of
https://github.com/nix-community/comma.git
synced 2024-09-11 03:55:24 +03:00
deprecate the --update flag
this has caused users to be confused about what program is outputting errors
This commit is contained in:
parent
1dfd35ede2
commit
7aeaea325c
@ -15,7 +15,7 @@ pub fn update_database() {
|
||||
pub fn check_database_exists() {
|
||||
let database_file = get_database_file();
|
||||
if !database_file.exists() {
|
||||
println!("Warning: Nix-index database does not exist, try updating with `comma --update`.");
|
||||
println!("Warning: Nix-index database does not exist, try updating with `nix run 'nixpkgs#nix-index' --extra-experimental-features 'nix-command flakes'`.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ pub fn check_database_updated() {
|
||||
let database_file = get_database_file();
|
||||
if is_database_old(database_file) {
|
||||
println!(
|
||||
"Warning: Nix-index database is older than 30 days, try updating with `comma --update`."
|
||||
"Warning: Nix-index database is older than 30 days, try updating with `nix run 'nixpkgs#nix-index' --extra-experimental-features 'nix-command flakes'`."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -59,12 +59,13 @@ fn main() -> ExitCode {
|
||||
let args = Opt::parse();
|
||||
|
||||
if args.update {
|
||||
eprintln!("\"comma --update\" has been deprecated. use \"nix run 'nixpkgs#nix-index' --extra-experimental-features 'nix-command flakes'\"");
|
||||
index::update_database();
|
||||
}
|
||||
|
||||
// The command may not be given if `--update` was specified.
|
||||
if args.cmd.is_empty() {
|
||||
return ExitCode::SUCCESS;
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
|
||||
let command = &args.cmd[0];
|
||||
@ -145,7 +146,7 @@ struct Opt {
|
||||
#[clap(long, env = "COMMA_PICKER", default_value = "fzy")]
|
||||
picker: String,
|
||||
|
||||
/// Update nix-index database
|
||||
/// DEPRECATED Update nix-index database
|
||||
#[clap(short, long)]
|
||||
update: bool,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user