aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/diagnose_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-02 04:53:11 +0900
committernsfisis <nsfisis@gmail.com>2026-08-02 04:53:11 +0900
commit3b22fd4ede833b19c4113f88363021d00090d927 (patch)
treefdb7729ee696a20afc0396a5cee1e0304009ee63 /crates/shirabe/src/command/diagnose_command.rs
parenta5c6eaee73e4008a51d71c925b4fd410b27578c8 (diff)
downloadphp-shirabe-3b22fd4ede833b19c4113f88363021d00090d927.tar.gz
php-shirabe-3b22fd4ede833b19c4113f88363021d00090d927.tar.zst
php-shirabe-3b22fd4ede833b19c4113f88363021d00090d927.zip
fix(diagnose-command): pass the self-audit when installed.json is absent
A native binary never ships vendor/composer/installed.json, so Composer's "non-standard Composer installation" warning fired on every diagnose run and forced exit 1. The self-audit itself stays: a Composer source snapshot is planned to be embedded together with the plugin API implementation, which will make it functional; until then the missing file reports success, marked with TODO(phase-c). Also un-ignore diagnose_command_test::test_cmd_success: the other half of its ignore reason ("requires real network access") is no blocker — the PHP original runs its live packagist/github checks unguarded too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/diagnose_command.rs')
-rw-r--r--crates/shirabe/src/command/diagnose_command.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/diagnose_command.rs b/crates/shirabe/src/command/diagnose_command.rs
index 3f69722a..2d00ca21 100644
--- a/crates/shirabe/src/command/diagnose_command.rs
+++ b/crates/shirabe/src/command/diagnose_command.rs
@@ -974,7 +974,12 @@ impl DiagnoseCommand {
None,
)?;
if !installed_json.exists() {
- return Ok(PhpMixed::String("<warning>Could not find Composer's installed.json, this must be a non-standard Composer installation.</>".to_string()));
+ // TODO(phase-c): the native binary never ships vendor/composer/installed.json, so
+ // Composer's "non-standard Composer installation" warning would fire on every run.
+ // A Composer source snapshot is planned to be embedded together with the plugin API
+ // implementation, which will make this self-audit functional; until then report
+ // success instead of the warning.
+ return Ok(PhpMixed::Bool(true));
}
let local_repo = FilesystemRepository::new(installed_json, false, None, None)?;