mirror of https://github.com/sbt/sbt.git
Add another run method in Resolvers for commands with no working directory
This commit is contained in:
parent
7efa24f59b
commit
5ed012c7d9
|
|
@ -42,13 +42,13 @@ object Resolvers
|
||||||
val revision = uri.getFragment
|
val revision = uri.getFragment
|
||||||
Some {
|
Some {
|
||||||
() => creates(localCopy) {
|
() => creates(localCopy) {
|
||||||
run(None, "svn", "checkout", "-r", revision, uri.toASCIIString, localCopy.getAbsolutePath)
|
run("svn", "checkout", "-r", revision, uri.toASCIIString, localCopy.getAbsolutePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
Some {
|
Some {
|
||||||
() => creates(localCopy) {
|
() => creates(localCopy) {
|
||||||
run(None, "svn", "checkout", uri.toASCIIString, localCopy.getAbsolutePath)
|
run("svn", "checkout", uri.toASCIIString, localCopy.getAbsolutePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +57,7 @@ object Resolvers
|
||||||
{
|
{
|
||||||
override val scheme = "hg"
|
override val scheme = "hg"
|
||||||
|
|
||||||
override def clone(at: String, into: File) = creates(into) {run(None, "hg", "clone", at, into.getAbsolutePath)}
|
override def clone(at: String, into: File) = creates(into) {run("hg", "clone", at, into.getAbsolutePath)}
|
||||||
|
|
||||||
override def checkout(branch: String, in: File)
|
override def checkout(branch: String, in: File)
|
||||||
{
|
{
|
||||||
|
|
@ -69,7 +69,7 @@ object Resolvers
|
||||||
{
|
{
|
||||||
override val scheme = "git"
|
override val scheme = "git"
|
||||||
|
|
||||||
override def clone(at: String, into: File) = creates(into) {run(None, "git", "clone", at, into.getAbsolutePath)}
|
override def clone(at: String, into: File) = creates(into) {run("git", "clone", at, into.getAbsolutePath)}
|
||||||
|
|
||||||
override def checkout(branch: String, in: File)
|
override def checkout(branch: String, in: File)
|
||||||
{
|
{
|
||||||
|
|
@ -113,6 +113,8 @@ object Resolvers
|
||||||
isWindows && !isCygwin
|
isWindows && !isCygwin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def run(command: String*) {run(None, command: _*)}
|
||||||
|
|
||||||
def run(cwd: Option[File], command: String*)
|
def run(cwd: Option[File], command: String*)
|
||||||
{
|
{
|
||||||
val result =
|
val result =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue