@@ -164,7 +164,7 @@ export async function downloadHaskellLanguageServer(
164
164
wrapper = downloadedWrapper ;
165
165
}
166
166
167
- const ghcup = path . join ( storagePath , ' ghcup' ) ;
167
+ const ghcup = path . join ( storagePath , ` ghcup${ exeExt } ` ) ;
168
168
const updateBehaviour = workspace . getConfiguration ( 'haskell' ) . get ( 'updateBehavior' ) as UpdateBehaviour ;
169
169
const [ installable_hls , latest_hls_version , project_ghc ] = await getLatestSuitableHLS (
170
170
context ,
@@ -294,7 +294,7 @@ async function getLatestSuitableHLS(
294
294
// TODO: we may run this function twice on startup (e.g. in extension.ts)
295
295
const project_ghc =
296
296
wrapper == undefined
297
- ? await callAsync ( ' ghc' , [ '--numeric-version' ] , storagePath , logger , undefined , false )
297
+ ? await callAsync ( ` ghc${ exeExt } ` , [ '--numeric-version' ] , storagePath , logger , undefined , false )
298
298
: await getProjectGHCVersion ( wrapper , workingDir , logger ) ;
299
299
300
300
// get installable HLS that supports the project GHC version (this might not be the most recent)
@@ -371,9 +371,9 @@ export async function downloadGHCup(context: ExtensionContext, logger: Logger):
371
371
fs . mkdirSync ( storagePath ) ;
372
372
}
373
373
374
- const ghcup = path . join ( storagePath , ' ghcup' ) ;
374
+ const ghcup = path . join ( storagePath , ` ghcup${ exeExt } ` ) ;
375
375
// ghcup exists, just upgrade
376
- if ( fs . existsSync ( path . join ( storagePath , ' ghcup' ) ) ) {
376
+ if ( fs . existsSync ( ghcup ) ) {
377
377
const args = [ '--no-verbose' , 'upgrade' , '-i' ] ;
378
378
await callAsync ( ghcup , args , storagePath , logger , undefined , false , { GHCUP_INSTALL_BASE_PREFIX : storagePath } ) ;
379
379
} else {
0 commit comments