aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/require.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-23 01:31:48 +0900
committernsfisis <nsfisis@gmail.com>2026-02-23 01:31:48 +0900
commita0c17873aeb88cc81be769317fcad37161bb516c (patch)
treeae767042cdb5d46248e07763553172f0d10990f4 /crates/mozart/src/commands/require.rs
parentc7a5859e1770dbc7cbc7cb1785c34b880162dfac (diff)
downloadphp-mozart-a0c17873aeb88cc81be769317fcad37161bb516c.tar.gz
php-mozart-a0c17873aeb88cc81be769317fcad37161bb516c.tar.zst
php-mozart-a0c17873aeb88cc81be769317fcad37161bb516c.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/require.rs')
-rw-r--r--crates/mozart/src/commands/require.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/mozart/src/commands/require.rs b/crates/mozart/src/commands/require.rs
index 2082f43..bfd120e 100644
--- a/crates/mozart/src/commands/require.rs
+++ b/crates/mozart/src/commands/require.rs
@@ -59,7 +59,7 @@ pub struct RequireArgs {
pub no_audit: bool,
/// Audit output format
- #[arg(long)]
+ #[arg(long, value_parser = ["table", "plain", "json", "summary"])]
pub audit_format: Option<String>,
/// Do not block on security advisories
@@ -777,6 +777,7 @@ pub async fn execute(
classmap_authoritative: args.classmap_authoritative,
apcu_autoloader: false,
apcu_autoloader_prefix: None,
+ download_only: false,
},
)
.await?;