diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2025-12-02 20:35:57 +0100 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-12-02 21:07:07 +0100 |
| commit | 5c558f6b107a82370d7207caad9bf88fcab77c86 (patch) | |
| tree | 0b565dcf2409349fd77f7b1045c14a03c15228a3 /src | |
| parent | 41b2081f57e8356fe26f67f819af480d10219d25 (diff) | |
Prepend default repo to job ID only for repo job root
Diffstat (limited to 'src')
| -rw-r--r-- | src/Command/Run.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Command/Run.hs b/src/Command/Run.hs index 7b34757..982a07a 100644 --- a/src/Command/Run.hs +++ b/src/Command/Run.hs @@ -146,7 +146,8 @@ mergeSources sources = do argumentJobSource :: [ JobName ] -> CommandExec JobSource argumentJobSource [] = emptyJobSource argumentJobSource names = do - ( config, jcommit ) <- getJobRoot >>= \case + jobRoot <- getJobRoot + ( config, jcommit ) <- case jobRoot of JobRootConfig config -> do commit <- sequence . fmap createWipCommit =<< tryGetDefaultRepo return ( config, commit ) @@ -158,7 +159,9 @@ argumentJobSource names = do jobtree <- case jcommit of Just commit -> (: []) <$> getCommitTree commit Nothing -> return [] - let cidPart = map (JobIdTree Nothing "" . treeId) jobtree + let cidPart = case jobRoot of + JobRootConfig {} -> [] + JobRootRepo {} -> map (JobIdTree Nothing "" . treeId) jobtree forM_ names $ \name -> case find ((name ==) . jobName) (configJobs config) of Just _ -> return () |