aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/require.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-23 01:45:14 +0900
committernsfisis <nsfisis@gmail.com>2026-02-23 01:58:50 +0900
commitcc8f22ff7f1d9ed32e14f5b59a5498f8aa653091 (patch)
treee5845601cff6ddf5421070991ebcb3b3c07650a5 /crates/mozart/src/commands/require.rs
parent5ec946917ee42deaf2c4e960887cc7063823a514 (diff)
downloadphp-mozart-cc8f22ff7f1d9ed32e14f5b59a5498f8aa653091.tar.gz
php-mozart-cc8f22ff7f1d9ed32e14f5b59a5498f8aa653091.tar.zst
php-mozart-cc8f22ff7f1d9ed32e14f5b59a5498f8aa653091.zip
fix(show): validate option combinations and support --ignore wildcards
- Reject invalid option combinations: --direct with --all/--platform/--available, --tree with --all/--available/--latest/--path, --self with package argument - Reject unsupported --format values (only "text" and "json" allowed) - Warn when --ignore is used without --outdated - Support wildcard patterns in --ignore values via matches_wildcard 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.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/mozart/src/commands/require.rs b/crates/mozart/src/commands/require.rs
index 16d865f..ef5ff04 100644
--- a/crates/mozart/src/commands/require.rs
+++ b/crates/mozart/src/commands/require.rs
@@ -679,9 +679,10 @@ pub async fn execute(
eprintln!("Warning: Failed to revert composer.json: {revert_err}");
}
if let Some(ref lock_content) = original_composer_lock
- && let Err(revert_err) = std::fs::write(&lock_path_for_backup, lock_content) {
- eprintln!("Warning: Failed to revert composer.lock: {revert_err}");
- }
+ && let Err(revert_err) = std::fs::write(&lock_path_for_backup, lock_content)
+ {
+ eprintln!("Warning: Failed to revert composer.lock: {revert_err}");
+ }
}
return Err(mozart_core::exit_code::bail(
mozart_core::exit_code::DEPENDENCY_RESOLUTION_FAILED,