Skip to content

Commit

Permalink
Updated wait-for-it.sh download
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Roman committed Jul 22, 2021
1 parent 62aa067 commit da5d139
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions project/WaitForIt.scala
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import java.io.File

import sbt._
import sbt.io.Using

import java.io.File

object WaitForIt {

def download(target: File): File = {
import scala.sys.process._
val waitUrl = url("https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh")
val file = target / "wait-for-it.sh"
assert((waitUrl #> file !) == 0, "Downloading wait-for-it.sh script failed")
Using.urlInputStream(waitUrl) { is =>
IO.transfer(is, file)
}
file
}
}

0 comments on commit da5d139

Please sign in to comment.