Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
Krystian Panek committed Sep 3, 2020
1 parent ec3725b commit 9e57f6e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ class Container(val docker: Docker, val name: String) {

val command = "touch ${paths.joinToString(" ")}"
when (paths.count()) {
0 -> logger.info("No files to ensure on container '$name'")
1 -> execShell("Ensuring file '${paths.first()}'", command)
else -> execShell("Ensuring files (${paths.count()})", command)
}
Expand All @@ -199,6 +200,7 @@ class Container(val docker: Docker, val name: String) {
fun ensureDir(paths: Iterable<String>) {
val command = "mkdir -p ${paths.joinToString(" ")}"
when (paths.count()) {
0 -> logger.info("No directories to ensure on container '$name'")
1 -> execShell("Ensuring directory '${paths.first()}'", command)
else -> execShell("Ensuring directories (${paths.count()})", command)
}
Expand Down

0 comments on commit 9e57f6e

Please sign in to comment.