Skip to content

Commit 8b8a53a

Browse files
committed
Minor change when user cancels the background task.
1 parent 9ce7a2e commit 8b8a53a

File tree

1 file changed

+4
-1
lines changed
  • plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts

1 file changed

+4
-1
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/artifacts/ArtifactHelper.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ class ArtifactHelper(private val lspArtifactsPath: Path = DEFAULT_ARTIFACT_PATH,
128128
return downloadPath
129129
} catch (e: Exception) {
130130
when (e) {
131-
is CancellationException -> { logger.error(e) { "User cancelled download and extracting of LSP artifacts.." } }
131+
is CancellationException -> {
132+
logger.error(e) { "User cancelled download and extracting of LSP artifacts.." }
133+
currentAttempt.set(maxDownloadAttempts) // To exit the while loop.
134+
}
132135
else -> { logger.error(e) { "Failed to download/move LSP artifacts on attempt ${currentAttempt.get()}" } }
133136
}
134137
temporaryDownloadPath.toFile().deleteRecursively()

0 commit comments

Comments
 (0)