Skip to content

Commit ff71436

Browse files
lukel97puffnfresh
andcommitted
Make storage directory before getProjectGhcVersion
Co-authored-by: Brian McKenna <[email protected]>
1 parent 1c708db commit ff71436

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/hlsBinaries.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ export async function downloadServer(
101101
});
102102
});
103103

104+
// Make sure to create this before getProjectGhcVersion
105+
if (!fs.existsSync(context.globalStoragePath)) {
106+
fs.mkdirSync(context.globalStoragePath);
107+
}
108+
104109
const githubOS = getGithubOS();
105110
if (githubOS === null) {
106111
// Don't have any binaries available for this platform
@@ -129,10 +134,6 @@ export async function downloadServer(
129134
}
130135
const binaryURL = url.parse(asset.browser_download_url);
131136

132-
if (!fs.existsSync(context.globalStoragePath)) {
133-
fs.mkdirSync(context.globalStoragePath);
134-
}
135-
136137
const serverName = `haskell-language-server-${release.tag_name}-${process.platform}-${ghcVersion}`;
137138
const binaryDest = path.join(context.globalStoragePath, serverName);
138139

0 commit comments

Comments
 (0)