add another Process constructor

This commit is contained in:
Mark Harrah 2010-09-27 18:50:17 -04:00
parent 5ab652f02d
commit 2d535e25c8
1 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,9 @@ object Process extends ProcessExtra
/** create ProcessBuilder with working dir set to File and extra environment variables */
def apply(command: String, cwd: File, extraEnv: (String,String)*): ProcessBuilder =
apply(command, Some(cwd), extraEnv : _*)
/** create ProcessBuilder with working dir set to File and extra environment variables */
def apply(command: Seq[String], cwd: File, extraEnv: (String,String)*): ProcessBuilder =
apply(command, Some(cwd), extraEnv : _*)
/** create ProcessBuilder with working dir optionaly set to File and extra environment variables */
def apply(command: String, cwd: Option[File], extraEnv: (String,String)*): ProcessBuilder = {
apply(command.split("""\s+"""), cwd, extraEnv : _*)