Skip to content

Commit 707b09b

Browse files
committed
Improve popups and make PATH default with a warning message
1 parent 585bf0d commit 707b09b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hlsBinaries.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export async function findHaskellLanguageServer(
229229
const promptMessage = 'How do you want the extension to manage/discover HLS and the relevant toolchain?';
230230

231231
const decision =
232-
(await window.showInformationMessage(promptMessage, 'system ghcup (recommended)', 'internal ghcup', 'PATH')) ||
232+
(await window.showInformationMessage(promptMessage, 'automatically via GHCup', 'manually via PATH')) ||
233233
null;
234234
if (decision === 'system ghcup (recommended)') {
235235
manageHLS = 'system-ghcup';
@@ -238,7 +238,8 @@ export async function findHaskellLanguageServer(
238238
} else if (decision === 'PATH') {
239239
manageHLS = 'PATH';
240240
} else {
241-
throw new Error(`Internal error: unexpected decision ${decision}`);
241+
window.showWarningMessage('Choosing default PATH method for HLS discovery. You can change this via \'haskell.manageHLS\' in the settings.');
242+
manageHLS = 'PATH';
242243
}
243244
workspace.getConfiguration('haskell').update('manageHLS', manageHLS, ConfigurationTarget.Global);
244245
}

0 commit comments

Comments
 (0)