diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-21 11:04:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-21 11:04:06 +0900 |
| commit | f030dc63ea84a13f1e494a1541b6120c0969f383 (patch) | |
| tree | 578dc7eec648c0b9ac50bcb234430fa913c0e23c /crates/mozart/src/downloader.rs | |
| parent | a03ad0152ec28cdd1cc05f96a9823807dbb2b818 (diff) | |
| download | php-mozart-f030dc63ea84a13f1e494a1541b6120c0969f383.tar.gz php-mozart-f030dc63ea84a13f1e494a1541b6120c0969f383.tar.zst php-mozart-f030dc63ea84a13f1e494a1541b6120c0969f383.zip | |
feat(install): implement install command with lock-based package installation
Replaces the todo!() stub with a full implementation that reads
composer.lock, computes install/update/skip/remove operations by
comparing against vendor/composer/installed.json, downloads packages
via the downloader module, and writes the updated installed registry.
Handles edge cases: missing lock file, stale lock file, no dist info,
empty packages, --dry-run, --no-dev, deprecated flags, and vendor
directory cleanup after removals.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/downloader.rs')
| -rw-r--r-- | crates/mozart/src/downloader.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/mozart/src/downloader.rs b/crates/mozart/src/downloader.rs index b477ab4..403f4d6 100644 --- a/crates/mozart/src/downloader.rs +++ b/crates/mozart/src/downloader.rs @@ -30,9 +30,7 @@ pub fn download_dist(url: &str, expected_shasum: Option<&str>) -> anyhow::Result let computed = format!("{result:x}"); if computed != shasum { - anyhow::bail!( - "SHA-1 checksum mismatch for {url}: expected {shasum}, got {computed}" - ); + anyhow::bail!("SHA-1 checksum mismatch for {url}: expected {shasum}, got {computed}"); } } |
