diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-23 01:51:10 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-23 01:59:59 +0900 |
| commit | eb1e21c059d83f0af9786e4d3cace80afe8456a2 (patch) | |
| tree | 750d5f2816c9086d62066f86255f7dea545ef203 /crates/mozart/src/commands/self_update.rs | |
| parent | 7090482473902f53365f96ba4364dd115e53601a (diff) | |
| download | php-mozart-eb1e21c059d83f0af9786e4d3cace80afe8456a2.tar.gz php-mozart-eb1e21c059d83f0af9786e4d3cace80afe8456a2.tar.zst php-mozart-eb1e21c059d83f0af9786e4d3cace80afe8456a2.zip | |
fix(validate): warn on orphan scripts-descriptions/aliases and honor config.lock
- Detect scripts-descriptions and scripts-aliases keys referencing
non-existent scripts and emit warnings matching Composer's behavior
- Respect config.lock=false in composer.json to skip lock file checks
unless --check-lock is explicitly passed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/self_update.rs')
| -rw-r--r-- | crates/mozart/src/commands/self_update.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/mozart/src/commands/self_update.rs b/crates/mozart/src/commands/self_update.rs index 0c2f0f6..a0cd59d 100644 --- a/crates/mozart/src/commands/self_update.rs +++ b/crates/mozart/src/commands/self_update.rs @@ -460,9 +460,10 @@ fn clean_backups(data_dir: &Path, except: Option<&Path>) -> anyhow::Result<()> { if is_backup { if let Some(exc) = except - && path == exc { - continue; - } + && path == exc + { + continue; + } std::fs::remove_file(&path) .map_err(|e| anyhow::anyhow!("Could not remove backup {}: {e}", path.display()))?; } |
