}
private ProcessBuilder buildProcessBuilder(TaskInfo taskInfo, ExecutorData executorData) {
final String cmd = getCommand(executorData);
templateManager.writeEnvironmentScript(getPath("deploy.env"), new EnvironmentContext(taskInfo));
task.getLog().info("Writing a runner script to execute {}", cmd);
templateManager.writeRunnerScript(getPath("runner.sh"), new RunnerContext(cmd, configuration.getTaskAppDirectory(), executorData.getUser().or(configuration.getDefaultRunAsUser()), configuration.getServiceLog(), task.getTaskId(), executorData.getMaxTaskThreads().or(configuration.getMaxTaskThreads())));