Skip to content

Commit b28b356

Browse files
committed
feat: only show zed if it's installed
1 parent df817a1 commit b28b356

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/Console/InstallCommand.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,7 @@ private function outro(): void
173173
$guidelines[] = 'g:style';
174174
}
175175

176-
// Combine all data
177176
$allData = array_merge($ideNames, $agentNames, $boostFeatures, $guidelines);
178-
179-
// Create a compact CSV string and base64 encode
180177
$installData = base64_encode(implode(',', $allData));
181178

182179
$link = $this->hyperlink($label, 'https://boost.laravel.com/installed/?d='.$installData);
@@ -320,12 +317,21 @@ private function selectCodeEnvironments(string $contractClass, string $label): C
320317
return collect();
321318
}
322319

323-
$options = $availableEnvironments->mapWithKeys(function (CodeEnvironment $environment) use ($config) {
324-
$displayMethod = $config['displayMethod'];
325-
$displayText = $environment->{$displayMethod}();
320+
$options = $availableEnvironments
321+
->filter(function (CodeEnvironment $environment) {
322+
// We only show Zed if it's actually installed
323+
if ($environment->name() === 'zed' && ! in_array('zed', $this->systemInstalledCodeEnvironments)) {
324+
return false;
325+
}
326+
327+
return true;
328+
})
329+
->mapWithKeys(function (CodeEnvironment $environment) use ($config) {
330+
$displayMethod = $config['displayMethod'];
331+
$displayText = $environment->{$displayMethod}();
326332

327-
return [get_class($environment) => $displayText];
328-
})->sort();
333+
return [get_class($environment) => $displayText];
334+
})->sort();
329335

330336
$detectedClasses = [];
331337
$installedEnvNames = array_unique(array_merge(

0 commit comments

Comments
 (0)