Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Automatic creation of a config folder
  • Loading branch information
derNiklaas authored Apr 18, 2019
commit 17a8cfd8494f8c46fdef03561d9f8fe9338d0d2d
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,21 @@ class ChatOverflow(val pluginFolderPath: String,
logger debug "Finished updating type registry."

logger debug "Loading configs and credentials."
createConfigFolder()
askForPassword()
load()
logger debug "Finished loading configs and credentials."

logger debug "Finished initialization."
}

private def createConfigFolder(): Unit = {
val file = new File(s"$configFolderPath/")
if (!file.exists()) {
file.mkdir()
}
}

private def askForPassword(): Unit = {
val password = scala.io.StdIn.readLine("Please enter password > ").toCharArray
credentialsService.setPassword(password)
Expand Down