From c40eaeef5d82768e205fb4934db672fc72d71020 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Wed, 4 Feb 2026 15:14:30 +0800 Subject: [PATCH] Fix custom artifact binary download `is-installed` check --- src/StaticPHP/Artifact/Artifact.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/StaticPHP/Artifact/Artifact.php b/src/StaticPHP/Artifact/Artifact.php index b3e27371..dc602538 100644 --- a/src/StaticPHP/Artifact/Artifact.php +++ b/src/StaticPHP/Artifact/Artifact.php @@ -131,7 +131,9 @@ class Artifact public function isBinaryExtracted(?string $target_os = null, bool $compare_hash = false): bool { $target_os = $target_os ?? SystemTarget::getCurrentPlatformString(); - $extract_config = $this->getBinaryExtractConfig(); + // Get cache info first for custom binary support (extract path may be stored in cache) + $cache_info = ApplicationContext::get(ArtifactCache::class)->getBinaryInfo($this->name, $target_os); + $extract_config = $this->getBinaryExtractConfig($cache_info ?? []); $mode = $extract_config['mode']; // For merge mode, check marker file