Use TMP_DIR for calls
This commit is contained in:
@@ -36,6 +36,7 @@ object Main {
|
||||
logger.debug(s"Subcommand requires ${tasks.size} tasks")
|
||||
try {
|
||||
tasks.foreach(_.run())
|
||||
c.cleanup()
|
||||
} catch {
|
||||
case e: AssertException =>
|
||||
logger.error(s"Error during task execution, see above!")
|
||||
@@ -43,7 +44,6 @@ object Main {
|
||||
logger.error(s"General exception ${e.getMessage}")
|
||||
e.printStackTrace()
|
||||
}
|
||||
c.cleanup()
|
||||
case _ =>
|
||||
logger.error(s"Found no subcommand, see help below")
|
||||
conf.printHelp()
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.minres.tgc.hammer.tasks
|
||||
|
||||
import com.minres.tgc.hammer.Global.TMP_DIR
|
||||
import com.minres.tgc.hammer.Main
|
||||
import com.minres.tgc.hammer.util.Logging
|
||||
import os.{Path, Shellable}
|
||||
@@ -26,6 +27,6 @@ trait TaskImpl[T <: Task : ClassTag] extends Task with Logging[T] {
|
||||
os.Inherit
|
||||
else
|
||||
logFile
|
||||
os.proc("bash", "-c", command).call(stdout = output)
|
||||
os.proc("bash", "-c", command).call(cwd = TMP_DIR, stdout = output)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user