Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shmishleniy authored Sep 26, 2017
1 parent 72c3fbd commit 92be038
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/scala/DeploySSH.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package deployssh

import com.typesafe.config.{ConfigFactory, Config, ConfigParseOptions}
import scala.collection.JavaConverters._
import fr.janalyse.ssh._
import sbt._

Expand Down Expand Up @@ -42,7 +43,6 @@ object DeploySSH extends AutoPlugin {
class SkipDeployException(e: Exception) extends Exception(e)

import autoImport._
import scala.collection.JavaConversions._
override lazy val projectSettings = defaultSetting ++ Seq(
deployConfigsLoaded := {
val log = sbt.Keys.streams.value.log
Expand Down Expand Up @@ -73,7 +73,7 @@ object DeploySSH extends AutoPlugin {
deployConfigsLoaded.value.foldLeft(List[ServerConfig]()) {
(lst, config) => {
val serverConfigs = for {
server <- Try(config.getObjectList("servers").toList) getOrElse List()
server <- Try(config.getObjectList("servers").asScala.toList) getOrElse List()
serverConfig = server.toConfig
name = serverConfig.getString("name")
host = serverConfig.getString("host")
Expand Down Expand Up @@ -118,7 +118,7 @@ object DeploySSH extends AutoPlugin {
log.info(s"Deploy done for server=$serverName.")
} catch {
case error: SkipDeployException =>
log.error(s"Failed to deploy to the server=$serverName, error=${error.getMessage}. Skip deployment.\r\nStack=${error.getStackTraceString}")
log.error(s"Failed to deploy to the server=$serverName, error=${error.getMessage}. Skip deployment.\r\nStack=${error.getStackTrace.mkString("", "\r\n", "")}")
}
case None =>
log.error(s"Failed to find config for server name=$serverName. Skip deployment process.")
Expand Down

0 comments on commit 92be038

Please sign in to comment.