Skip to content

Commit

Permalink
Merge pull request #591 from hasufell/fix-ghcup-missing
Browse files Browse the repository at this point in the history
Fixes #589
  • Loading branch information
fendor authored Apr 27, 2022
2 parents 709adac + 6463570 commit 0a1af34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ function getWithRedirects(opts: https.RequestOptions, f: (res: http.IncomingMess
/*
* Checks if the executable is on the PATH
*/
export async function executableExists(exe: string): Promise<boolean> {
export function executableExists(exe: string): boolean {
const isWindows = process.platform === 'win32';
let newEnv: IEnvVars = await resolveServerEnvironmentPATH(
let newEnv: IEnvVars = resolveServerEnvironmentPATH(
workspace.getConfiguration('haskell').get('serverEnvironment') || {}
);
newEnv = { ...(process.env as IEnvVars), ...newEnv };
Expand Down Expand Up @@ -370,7 +370,7 @@ export async function addPathToProcessPath(extraPath: string, logger: Logger): P
return path.join(pathSep);
}

export async function resolveServerEnvironmentPATH(serverEnv: IEnvVars): Promise<IEnvVars> {
export function resolveServerEnvironmentPATH(serverEnv: IEnvVars): IEnvVars {
const pathSep = process.platform === 'win32' ? ';' : ':';
const path: string[] | null = serverEnv.PATH
? serverEnv.PATH.split(pathSep).map((p) => resolvePATHPlaceHolders(p))
Expand Down

0 comments on commit 0a1af34

Please sign in to comment.