diff --git a/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/main.kt b/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/main.kt index 25e9517dd73..89be7869b47 100644 --- a/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/main.kt +++ b/klib/src/main/kotlin/org/jetbrains/kotlin/cli/klib/main.kt @@ -112,6 +112,11 @@ class Library(val name: String, val requestedRepository: String?, val target: St } fun install() { + if (!repository.exists) { + warn("Repository does not exist: $repository. Creating.") + repository.mkdirs() + } + Library(File(name).name.removeSuffix(KLIB_FILE_EXTENSION_WITH_DOT), requestedRepository, target).remove(true) val library = libraryInCurrentDir(name) @@ -185,8 +190,6 @@ fun main(args: Array) { val library = Library(command.library, repository, target) - warn("IMPORTANT: the library format is unstable now. It can change with any new git commit without warning!") - when (command.verb) { "contents" -> library.contents() "info" -> library.info()