Fix launch of external program
This commit is contained in:
@@ -5,8 +5,9 @@ import os.Shellable
|
||||
|
||||
class CommandGroup(name: String) extends BaseGroup {
|
||||
override def getToolParameters: Seq[Shellable] = {
|
||||
val sub = options.toSeq.map(_.getToolParameters.map(_.value).mkString("="))
|
||||
Seq(s"""$name="${sub.mkString(" ")}"""")
|
||||
val sub = options.toSeq.map(_.getToolParameters.flatMap(_.value).mkString("=")).filter(!_.isEmpty)
|
||||
println(sub)
|
||||
Seq(s"$name=\'${sub.mkString(" ")}\'")
|
||||
}
|
||||
|
||||
override def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = {
|
||||
|
@@ -9,6 +9,8 @@ trait Task {
|
||||
def runExecutable(execPath: Path, args: Shellable*): os.CommandResult = {
|
||||
println(s"Executing $execPath with")
|
||||
println(args.flatMap(_.value).mkString(" "))
|
||||
os.proc(execPath, args).call()
|
||||
println(args)
|
||||
val command = s"$execPath ${args.flatMap(_.value).mkString(" ")}"
|
||||
os.proc("bash", "-c", command).call(stdout = os.Inherit)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user