Skip to content

Commit 897f6f2

Browse files
fix: make webview helper installer non-blocking for composer install
- Always exit 0 — download failure is a warning, not an error - Skip entirely in CI (GITHUB_ACTIONS/CI env vars) where binary is built from source in a later workflow step Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c631a59 commit 897f6f2

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

scripts/install-webview-helper.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ function buildFromSourceInstructions(): string
128128

129129
// ── Main ──────────────────────────────────────────────────────────────────
130130

131+
// Skip in CI environments — binary is built from source in a later step
132+
if (getenv('CI') || getenv('GITHUB_ACTIONS')) {
133+
echo "php-gui: Skipping WebView helper download (CI environment detected).\n";
134+
exit(0);
135+
}
136+
131137
echo "php-gui: Installing WebView helper binary...\n";
132138

133139
$binaryName = getBinaryName();
@@ -149,11 +155,12 @@ function buildFromSourceInstructions(): string
149155
$tag = getLatestReleaseTag();
150156

151157
if ($tag === null) {
152-
echo " WARNING: Could not fetch release info from GitHub.\n";
158+
echo " NOTE: Could not fetch release info from GitHub.\n";
153159
echo " This may be due to network issues or no releases published yet.\n";
154160
echo "\n";
155161
echo buildFromSourceInstructions();
156-
exit(1);
162+
// Exit 0 — download is best-effort, not a hard requirement
163+
exit(0);
157164
}
158165

159166
echo " Release: {$tag}\n";
@@ -165,8 +172,8 @@ function buildFromSourceInstructions(): string
165172
exit(0);
166173
}
167174

168-
// Download failed
169-
echo " WARNING: Download failed.\n";
175+
// Download failed — warn but don't break composer install
176+
echo " NOTE: Download failed. The WebView feature requires the helper binary.\n";
170177
echo "\n";
171178
echo buildFromSourceInstructions();
172-
exit(1);
179+
exit(0);

0 commit comments

Comments
 (0)