refactor!: drop the --install-from tombstone entirely
The flag no longer exists in any form; --install <GIT_URL|OWNER/REPO> is the only spelling.
This commit is contained in:
+1
-18
@@ -197,14 +197,6 @@ pub struct Cli {
|
|||||||
help_heading = "Installation & Updates"
|
help_heading = "Installation & Updates"
|
||||||
)]
|
)]
|
||||||
pub git_host: Option<String>,
|
pub git_host: Option<String>,
|
||||||
/// Removed; use --install <GIT_URL> instead
|
|
||||||
#[arg(
|
|
||||||
long,
|
|
||||||
hide = true,
|
|
||||||
value_name = "GIT_URL",
|
|
||||||
help_heading = "Installation & Updates"
|
|
||||||
)]
|
|
||||||
pub install_from: Option<String>,
|
|
||||||
/// Reinstall bundled assets for a category (asks before overwriting your local changes)
|
/// Reinstall bundled assets for a category (asks before overwriting your local changes)
|
||||||
#[arg(
|
#[arg(
|
||||||
long,
|
long,
|
||||||
@@ -597,14 +589,6 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn parse_install_from_is_a_tombstone() {
|
|
||||||
let cli = parse(&["--install-from", "https://github.com/x/y"]);
|
|
||||||
assert!(cli.install.is_none());
|
|
||||||
assert_eq!(cli.install_from.as_deref(), Some("https://github.com/x/y"));
|
|
||||||
assert!(cli.text.is_empty());
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_install_builtins_conflicts_with_install() {
|
fn parse_install_builtins_conflicts_with_install() {
|
||||||
assert!(
|
assert!(
|
||||||
@@ -666,10 +650,9 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn help_omits_install_from_and_shows_install_builtins() {
|
fn help_shows_install_builtins() {
|
||||||
use clap::CommandFactory;
|
use clap::CommandFactory;
|
||||||
let help = Cli::command().render_long_help().to_string();
|
let help = Cli::command().render_long_help().to_string();
|
||||||
assert!(!help.contains("--install-from"), "help: {help}");
|
|
||||||
assert!(help.contains("--install-builtins"));
|
assert!(help.contains("--install-builtins"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,10 +127,6 @@ async fn main() -> Result<()> {
|
|||||||
return sandbox::launch(name.clone(), cli.fresh);
|
return sandbox::launch(name.clone(), cli.fresh);
|
||||||
}
|
}
|
||||||
|
|
||||||
if cli.install_from.is_some() {
|
|
||||||
bail!("--install-from was removed; use --install <GIT_URL|OWNER/REPO> instead");
|
|
||||||
}
|
|
||||||
|
|
||||||
install_builtins()?;
|
install_builtins()?;
|
||||||
|
|
||||||
if let Some(category) = cli.install_builtins {
|
if let Some(category) = cli.install_builtins {
|
||||||
|
|||||||
Reference in New Issue
Block a user