Skip to content

Commit 88a34e0

Browse files
authored
fix: if the plugin directory doesn't exist in the Idea plugin path, create it before trying to download (#673)
1 parent 31928bd commit 88a34e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/kotlin/io/snyk/plugin/services/download/CliDownloader.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class CliDownloader {
4040

4141
fun downloadFile(cliFile: File, cliVersion: String, indicator: ProgressIndicator): File {
4242
indicator.checkCanceled()
43+
if (!cliFile.parentFile.exists()){
44+
Files.createDirectories(cliFile.parentFile.toPath())
45+
}
4346
val downloadFile = try {
4447
File.createTempFile(cliFile.name, ".download", cliFile.parentFile)
4548
} catch (e: Exception) {

0 commit comments

Comments
 (0)