diff options
Diffstat (limited to 'src/Command/JobId.hs')
| -rw-r--r-- | src/Command/JobId.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Command/JobId.hs b/src/Command/JobId.hs index 096ed56..b349ebe 100644 --- a/src/Command/JobId.hs +++ b/src/Command/JobId.hs @@ -5,6 +5,7 @@ module Command.JobId ( import Control.Monad import Control.Monad.IO.Class +import Data.Bifunctor import Data.Text (Text) import Data.Text qualified as T @@ -52,7 +53,8 @@ cmdJobId :: JobIdCommand -> CommandExec () cmdJobId (JobIdCommand JobIdOptions {..} ref) = do einput <- getEvalInput out <- getOutput - JobId ids <- either (tfail . textEvalError) (return . jobId . fst) =<< + [ JobId ids ] <- either tfail (return . map jobId) =<< + return . either (Left . textEvalError) (first T.pack . jobsetJobsEither) =<< liftIO (runEval (evalJobReference ref) einput) outputMessage out $ textJobId $ JobId ids |