cover the cli-install env fallback and stale-GUI activation paths

Adds the two missing cases that left lib/kernel/src/cli_install.dart:74
(default-environment constructor branch) and the builtin extension's
stale-GUI activation warning uncovered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 12:59:48 +02:00
co-authored by Claude Opus 4.8
parent 9bdab1d2d3
commit f63ab521f1
2 changed files with 24 additions and 0 deletions
+8
View File
@@ -128,6 +128,14 @@ void main() {
);
expect(i.bundledClientCandidates, ['/opt/clide/bundle/clide-cli']);
});
test('falls back to the process environment when no env is passed', () {
// No env → uses Platform.environment; the in-bundle candidate still
// derives from the exe dir and the install dir from $HOME.
final i = CliInstaller(resolvedExecutable: '/opt/clide/bundle/clide');
expect(i.bundledClientCandidates, contains('/opt/clide/bundle/clide-cli'));
expect(i.installDir, endsWith('/.local/bin'));
});
});
group('expandedPath', () {