Skip to content

Commit 5927053

Browse files
committed
assert more file exists
1 parent 5182ba6 commit 5927053

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/lspArtifact.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,14 @@ export async function downloadLanguageServer(): Promise<void> {
151151
// Clean up temp directory
152152
fs.rmdirSync(tempDir)
153153
fs.rmdirSync(path.join(resourcesDir, 'servers', 'indexing'), { recursive: true })
154+
fs.rmdirSync(path.join(resourcesDir, 'servers', 'ripgrep'), { recursive: true })
154155
fs.rmSync(path.join(resourcesDir, 'servers', 'node'))
156+
if (!fs.existsSync(path.join(resourcesDir, 'servers', 'aws-lsp-codewhisperer.js'))) {
157+
throw new Error(`Extracting aws-lsp-codewhisperer.js failure`)
158+
}
159+
if (!fs.existsSync(path.join(resourcesDir, 'clients', 'amazonq-ui.js'))) {
160+
throw new Error(`Extracting amazonq-ui.js failure`)
161+
}
155162
console.log('Download and extraction completed successfully')
156163
resolve()
157164
} catch (err) {

0 commit comments

Comments
 (0)