@@ -22,10 +22,9 @@ import {
22
22
import { CommandNames } from './commands/constants' ;
23
23
import { ImportIdentifier } from './commands/importIdentifier' ;
24
24
import { DocsBrowser } from './docsBrowser' ;
25
- import { IEnvVars , addPathToProcessPath , downloadHaskellLanguageServer , downloadGHCup , validateHLSToolchain } from './hlsBinaries' ;
25
+ import { addPathToProcessPath , downloadGHCup , downloadHaskellLanguageServer , IEnvVars , validateHLSToolchain } from './hlsBinaries' ;
26
26
import { directoryExists , executableExists , expandHomeDir , ExtensionLogger , resolvePathPlaceHolders } from './utils' ;
27
27
28
-
29
28
// The current map of documents & folders to language servers.
30
29
// It may be null to indicate that we are in the process of launching a server,
31
30
// in which case don't try to launch another one for that uri
@@ -189,15 +188,15 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
189
188
} ) ;
190
189
191
190
let serverExecutable ;
192
- let addInternalServerPath : string | undefined = undefined ; // if we download HLS, add that bin dir to PATH
191
+ let addInternalServerPath : string | undefined ; // if we download HLS, add that bin dir to PATH
193
192
try {
194
193
// Try and find local installations first
195
194
serverExecutable = findManualExecutable ( logger , uri , folder ) ?? findLocalServer ( context , logger , uri , folder ) ;
196
195
if ( serverExecutable === null ) {
197
196
// If not, then try to download haskell-language-server binaries if it's selected
198
197
await downloadGHCup ( context , logger ) ;
199
198
serverExecutable = await downloadHaskellLanguageServer ( context , logger , currentWorkingDir ) ;
200
- await validateHLSToolchain ( serverExecutable , currentWorkingDir , logger )
199
+ await validateHLSToolchain ( serverExecutable , currentWorkingDir , logger ) ;
201
200
addInternalServerPath = path . dirname ( serverExecutable ) ;
202
201
if ( ! serverExecutable ) {
203
202
return ;
@@ -238,7 +237,7 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
238
237
logger . info ( cwdMsg ) ;
239
238
240
239
let serverEnvironment : IEnvVars = workspace . getConfiguration ( 'haskell' , uri ) . serverEnvironment ;
241
- if ( addInternalServerPath != undefined ) {
240
+ if ( addInternalServerPath !== undefined ) {
242
241
const newPath = addPathToProcessPath ( addInternalServerPath ) ;
243
242
serverEnvironment = {
244
243
PATH : newPath ,
0 commit comments