Skip to content

Commit

Permalink
Merge pull request #470 from snyk/fix/manual-dependency-management-no…
Browse files Browse the repository at this point in the history
…t-working

fix: don't cancel the progress when file existent and downloads disabled
  • Loading branch information
bastiandoetsch authored Feb 5, 2024
2 parents 0696a57 + 62c3a5f commit 2a9409c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Snyk Changelog

## [2.7.2]
### Fixed
- manually downloaded binaries were causing problems initiating scans

## [2.7.1]
### Fixed
- only start up language server after CLI update (fixes lock error on Windows)
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/io/snyk/plugin/SnykPostStartupActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ class SnykPostStartupActivity : ProjectActivity {
AnnotatorCommon.initRefreshing(project)

if (!ApplicationManager.getApplication().isUnitTestMode) {
getSnykTaskQueueService(project)?.waitUntilCliDownloadedIfNeeded(EmptyProgressIndicator())
try {
getSnykTaskQueueService(project)?.waitUntilCliDownloadedIfNeeded(EmptyProgressIndicator())
getSnykTaskQueueService(project)?.connectProjectToLanguageServer(project)
getAnalyticsScanListener(project)?.initScanListener()
} catch (e: Exception) {
Logger.getInstance(SnykPostStartupActivity::class.java).error(e)
Logger.getInstance(SnykPostStartupActivity::class.java).warn(e)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ class SnykTaskQueueService(val project: Project) {
"Please put a Snyk CLI executable in ${pluginSettings().cliPath} and retry."
SnykBalloonNotificationHelper.showError(msg, project)
}
indicator.cancel()
return
}
val cliDownloader = getSnykCliDownloaderService()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class SnykTaskQueueServiceTest : LightPlatformTestCase() {
val settings = setupAppSettingsForDownloadTests()
settings.manageBinariesAutomatically = false
val snykTaskQueueService = project.service<SnykTaskQueueService>()
every { isCliInstalled() } returns true

snykTaskQueueService.scan()

Expand Down

0 comments on commit 2a9409c

Please sign in to comment.