Skip to content

Commit 4f6a9a9

Browse files
committed
Rename 'system-ghcup' setting to 'GHCup'
1 parent 22dd269 commit 4f6a9a9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@
163163
"default": null,
164164
"description": "How to manage/find HLS installations.",
165165
"enum": [
166-
"system-ghcup",
166+
"GHCup",
167167
"PATH"
168168
],
169169
"enumDescriptions": [
170170
"Will use ghcup and manage Haskell toolchain in the default location (usually '~/.ghcup')",
171-
"Discovers HLS executables in system PATH"
171+
"Discovers HLS and other executables in system PATH"
172172
]
173173
},
174174
"haskell.useSystemGHCup": {

src/hlsBinaries.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface IEnvVars {
2626
[key: string]: string;
2727
}
2828

29-
type ManageHLS = 'system-ghcup' | 'PATH';
29+
type ManageHLS = 'GHCup' | 'PATH';
3030
let manageHLS = workspace.getConfiguration('haskell').get('manageHLS') as ManageHLS | null;
3131

3232
// On Windows the executable needs to be stored somewhere with an .exe extension
@@ -234,7 +234,7 @@ export async function findHaskellLanguageServer(
234234
(await window.showInformationMessage(promptMessage, 'automatically via GHCup', 'manually via PATH')) ||
235235
null;
236236
if (decision === 'automatically via GHCup') {
237-
manageHLS = 'system-ghcup';
237+
manageHLS = 'GHCup';
238238
} else if (decision === 'manually via PATH') {
239239
manageHLS = 'PATH';
240240
} else {
@@ -332,7 +332,7 @@ async function callGHCup(
332332
const metadataUrl = workspace.getConfiguration('haskell').metadataURL;
333333

334334
const storagePath: string = await getStoragePath(context);
335-
if (manageHLS === 'system-ghcup') {
335+
if (manageHLS === 'GHCup') {
336336
return await callAsync(
337337
'ghcup',
338338
['--no-verbose'].concat(metadataUrl ? ['-s', metadataUrl] : []).concat(args),
@@ -451,7 +451,7 @@ export async function getGHCup(context: ExtensionContext, logger: Logger): Promi
451451
throw new MissingToolError('ghcup');
452452
}
453453

454-
if (manageHLS === 'system-ghcup') {
454+
if (manageHLS === 'GHCup') {
455455
logger.info(`found ghcup at ${localGHCup}`);
456456
const args = ['upgrade'];
457457
await callGHCup(context, logger, args, 'Upgrading ghcup', true);

test/suite/extension.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ suite('Extension Test Suite', () => {
129129
, joinUri(getWorkspaceRoot().uri, 'bin', process.platform === 'win32' ? 'ghcup' : '.ghcup', 'cache')
130130
]
131131
);
132-
await getHaskellConfig().update('manageHLS', 'system-ghcup');
132+
await getHaskellConfig().update('manageHLS', 'GHCup');
133133
await getHaskellConfig().update('logFile', 'hls.log');
134134
await getHaskellConfig().update('trace.server', 'messages');
135135
await getHaskellConfig().update('releasesDownloadStoragePath', path.normalize(getWorkspaceFile('bin').fsPath));

0 commit comments

Comments
 (0)