remove WinProv.kt
This commit is contained in:
parent
67c7bf317d
commit
7230dbaaff
1 changed files with 0 additions and 30 deletions
|
@ -1,30 +0,0 @@
|
||||||
package org.domaindrivenarchitecture.provs.core.platforms
|
|
||||||
|
|
||||||
import org.domaindrivenarchitecture.provs.core.ProgressType
|
|
||||||
import org.domaindrivenarchitecture.provs.core.Prov
|
|
||||||
import org.domaindrivenarchitecture.provs.core.ProvResult
|
|
||||||
import org.domaindrivenarchitecture.provs.core.processors.LocalProcessor
|
|
||||||
import org.domaindrivenarchitecture.provs.core.processors.Processor
|
|
||||||
|
|
||||||
|
|
||||||
class WinProv internal constructor(processor : Processor = LocalProcessor(), name: String? = null, progressType: ProgressType)
|
|
||||||
: Prov(processor, name, progressType) {
|
|
||||||
|
|
||||||
private val SHELL = "cmd.exe"
|
|
||||||
|
|
||||||
override fun cmd(cmd: String, dir: String?, sudo: Boolean) : ProvResult = def {
|
|
||||||
require(!sudo, {"sudo not supported"})
|
|
||||||
xec(SHELL, "/c", if (dir == null) cmd else "cd $dir && $cmd")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun cmdNoLog(cmd: String, dir: String?, sudo: Boolean) : ProvResult = def {
|
|
||||||
require(!sudo, {"sudo not supported"})
|
|
||||||
xecNoLog(SHELL, "/c", if (dir == null) cmd else "cd $dir && $cmd")
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
override fun cmdNoEval(cmd: String, dir: String?, sudo: Boolean) : ProvResult {
|
|
||||||
require(!sudo, {"sudo not supported"})
|
|
||||||
return xec(SHELL, "/c", if (dir == null) cmd else "cd $dir && $cmd")
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue