diff --git a/src/Service/NodePackageManager.php b/src/Service/NodePackageManager.php index 2957dbf..9c31c03 100644 --- a/src/Service/NodePackageManager.php +++ b/src/Service/NodePackageManager.php @@ -244,8 +244,8 @@ private function diagnoseAndReportNpmFailure(string $path, SymfonyStyle $io, \Ex private function isCommandAvailable(string $command): bool { try { - $this->shell->execute('which ' . $command . ' > /dev/null 2>&1'); - return true; + $output = trim($this->shell->execute($command . ' --version 2>/dev/null')); + return $output !== ''; } catch (\Exception $e) { return false; }