Skip to content

Commit 1b3442f

Browse files
committed
Some fixes
1 parent 09af1eb commit 1b3442f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/hlsBinaries.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ async function callAsync(
102102
let newEnv: IEnvVars = await resolveServerEnvironmentPATH(workspace.getConfiguration('haskell').get('serverEnvironment') || {});
103103
newEnv = {...process.env as IEnvVars, ...newEnv};
104104
newEnv = {...newEnv, ...(envAdd || {})};
105-
logger.info(`newEnv: ${newEnv.PATH!.split(':')}`);
106105
return window.withProgress(
107106
{
108107
location: ProgressLocation.Notification,
@@ -255,7 +254,7 @@ export async function findHaskellLanguageServer(
255254
? await getLatestToolFromGHCup(context, logger, 'stack')
256255
: null;
257256
const recGHC =
258-
!executableExists('ghc') && (workspace.getConfiguration('haskell').get('installGHC') as boolean)
257+
(!(await executableExists('ghc')) && (workspace.getConfiguration('haskell').get('installGHC') as boolean))
259258
? await getLatestAvailableToolFromGHCup(context, logger, 'ghc', 'recommended')
260259
: null;
261260

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export async function addPathToProcessPath(extraPath: string, logger: Logger): P
333333

334334
export async function resolveServerEnvironmentPATH(serverEnv: IEnvVars): Promise<IEnvVars> {
335335
const pathSep = process.platform === 'win32' ? ';' : ':';
336-
const path: string[] = serverEnv.PATH.split(pathSep).map((p) => resolvePATHPlaceHolders(p));
336+
const path: string[] = serverEnv.PATH ? serverEnv.PATH.split(pathSep).map((p) => resolvePATHPlaceHolders(p)) : [];
337337
return {
338338
...serverEnv,
339339
...{ PATH: path.join(pathSep)}

0 commit comments

Comments
 (0)