From a0c17873aeb88cc81be769317fcad37161bb516c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 23 Feb 2026 01:31:48 +0900 Subject: fix(install): add CLI option validation, download-only wiring, and apcu-prefix implicit enable - Restrict --prefer-install to source/dist/auto and --audit-format to table/plain/json/summary via clap value_parser - Error when --prefer-install is combined with --prefer-source/--prefer-dist - Wire --download-only through InstallConfig to skip autoloader and installed.json - Implicitly enable --apcu-autoloader when --apcu-autoloader-prefix is set - Apply same validation fixes to update, require, remove, create-project commands Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/create_project.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/mozart/src/commands/create_project.rs') diff --git a/crates/mozart/src/commands/create_project.rs b/crates/mozart/src/commands/create_project.rs index 2156477..1aaa4c5 100644 --- a/crates/mozart/src/commands/create_project.rs +++ b/crates/mozart/src/commands/create_project.rs @@ -34,7 +34,7 @@ pub struct CreateProjectArgs { pub prefer_dist: bool, /// Forces usage of a specific install method (dist, source, auto) - #[arg(long)] + #[arg(long, value_parser = ["source", "dist", "auto"])] pub prefer_install: Option, /// Add a custom repository to discover the package @@ -90,7 +90,7 @@ pub struct CreateProjectArgs { pub no_audit: bool, /// Audit output format - #[arg(long)] + #[arg(long, value_parser = ["table", "plain", "json", "summary"])] pub audit_format: Option, /// Do not block on security advisories @@ -480,6 +480,7 @@ pub async fn execute( classmap_authoritative: false, apcu_autoloader: false, apcu_autoloader_prefix: None, + download_only: false, }, ) .await?; -- cgit v1.3.1