spawnBuild :: Job -> IO (FilePath, FilePath, ProcessHandle)
spawnBuild job = do
  now <- getCurrentTime
  let buildDir       = "build." ++ formatTime defaultTimeLocale "%Y%m%d%H%M%S" now
      executablePath = jobProjectPath job </> "build"
      buildPath      = jobProjectPath job </> buildDir
      outputPath     = buildPath </> "build.out"
  createDirectory buildPath
  (inR,  inW) <- createPipeHandles
  hClose inW
  stdout' <- openFile outputPath ReadWriteMode
  processHandle <- runProcess
    executablePath (jobArguments job) (Just buildPath) Nothing
     (Just inR) (Just stdout') Nothing
  return (buildPath, outputPath, processHandle)
spawnBuild :: Job -> IO (FilePath, FilePath, ProcessHandle)
spawnBuild job = do
  now <- getCurrentTime
  let buildDir       = "build." ++ formatTime defaultTimeLocale "%Y%m%d%H%M%S" now
      executablePath = jobProjectPath job </> "build"
      buildPath      = jobProjectPath job </> buildDir
      outputPath     = buildPath </> "build.out"
  createDirectory buildPath
  (inR,  inW) <- createPipeHandles
  hClose inW
  stdout' <- openFile outputPath ReadWriteMode
  processHandle <- runProcess
    executablePath (jobArguments job) (Just buildPath) Nothing
     (Just inR) (Just stdout') Nothing
  return (buildPath, outputPath, processHandle)
spawnBuild job = do
  now <- getCurrentTime
  let buildDir       = "build." ++ formatTime defaultTimeLocale "%Y%m%d%H%M%S" now
      executablePath = jobProjectPath job </> "build"
      buildPath      = jobProjectPath job </> buildDir
      outputPath     = buildPath </> "build.out"
  createDirectory buildPath
  (inR,  inW) <- createPipeHandles
  hClose inW
  stdout' <- openFile outputPath ReadWriteMode
  processHandle <- runProcess
    executablePath (jobArguments job) (Just buildPath) Nothing
     (Just inR) (Just stdout') Nothing
  return (buildPath, outputPath, processHandle)