@@ -286,7 +286,9 @@ export async function findHaskellLanguageServer(
286
286
: new InstalledTool ( 'stack' ) ;
287
287
const ghcInstalled = ( await executableExists ( 'ghc' ) )
288
288
? new InstalledTool ( 'ghc' )
289
- : await toolInstalled ( context , logger , 'ghc' , recGHC ! ) ;
289
+ // if recGHC is null, that means user disabled automatic handling,
290
+ // so we pretend it's installed in order to ignore it
291
+ : ( recGHC !== null ? await toolInstalled ( context , logger , 'ghc' , recGHC ) : new InstalledTool ( 'ghc' ) ) ;
290
292
const toInstall = [ hlsInstalled , cabalInstalled , stackInstalled , ghcInstalled ]
291
293
. filter ( ( tool ) => ! tool . installed )
292
294
. map ( ( tool ) => tool . nameWithVersion ) ;
@@ -903,7 +905,7 @@ class InstalledTool {
903
905
* @param version Version of the tool, expected to be either SemVer or PVP versioned.
904
906
* @param installed Is this tool currently installed?
905
907
*/
906
- public constructor ( readonly name : string , readonly version : string = '' , readonly installed : boolean = true ) {
908
+ public constructor ( readonly name : string , readonly version ? : string , readonly installed : boolean = true ) {
907
909
this . nameWithVersion = `${ name } -${ version } ` ;
908
910
}
909
911
}
0 commit comments