diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-23 01:45:14 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-23 01:58:50 +0900 |
| commit | cc8f22ff7f1d9ed32e14f5b59a5498f8aa653091 (patch) | |
| tree | e5845601cff6ddf5421070991ebcb3b3c07650a5 /crates/mozart/src/commands/require.rs | |
| parent | 5ec946917ee42deaf2c4e960887cc7063823a514 (diff) | |
| download | php-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.rs | 7 |
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, |
