diff options
Diffstat (limited to 'src/Command/Extract.hs')
-rw-r--r-- | src/Command/Extract.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Command/Extract.hs b/src/Command/Extract.hs index 8a0a035..b21c63c 100644 --- a/src/Command/Extract.hs +++ b/src/Command/Extract.hs @@ -14,6 +14,7 @@ import System.FilePath import Command import Eval +import Job import Job.Types @@ -78,7 +79,7 @@ cmdExtract (ExtractCommand ExtractOptions {..} ExtractArguments {..}) = do _ -> return False forM_ extractArtifacts $ \( ref, ArtifactName aname ) -> do - jid@(JobId ids) <- either (tfail . textEvalError) (return . jobId) =<< + jid@(JobId ids) <- either (tfail . textEvalError) (return . jobId . fst) =<< liftIO (runEval (evalJobReference ref) einput) let jdir = joinPath $ (storageDir :) $ ("jobs" :) $ map (T.unpack . textJobIdPart) ids @@ -103,4 +104,4 @@ cmdExtract (ExtractCommand ExtractOptions {..} ExtractArguments {..}) = do liftIO (doesPathExist tpath) >>= \case True -> tfail $ "destination ‘" <> T.pack tpath <> "’ already exists" False -> return () - liftIO $ copyFile (adir </> afile) tpath + liftIO $ copyRecursiveForce (adir </> afile) tpath |