diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-09-11 21:20:46 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-09-13 15:05:42 +0200 |
| commit | a589e61c2b807196696632eb17e8ad573daa9c08 (patch) | |
| tree | 254b6eb0c5a31de0cc94380ebdc00489ba54d010 /src/Command/Extract.hs | |
| parent | 73a141316db78b942160b11bdb3c92208f3eddd6 (diff) | |
Use colon as preferred job ID separator
Changelog: Colon `:` is now accepted and preferred as job ID separator.
Diffstat (limited to 'src/Command/Extract.hs')
| -rw-r--r-- | src/Command/Extract.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Command/Extract.hs b/src/Command/Extract.hs index 8dee537..3f78e2e 100644 --- a/src/Command/Extract.hs +++ b/src/Command/Extract.hs @@ -32,9 +32,8 @@ instance CommandArgumentsType ExtractArguments where extractDestination <- return (last args) return ExtractArguments {..} where - toArtifactRef tref = case T.breakOnEnd "." (T.pack tref) of - (jobref', aref) | Just ( jobref, '.' ) <- T.unsnoc jobref' - -> return ( parseJobRef jobref, ArtifactName aref ) + toArtifactRef tref = case parseJobRefParts $ T.pack tref of + parts@(_ : _) -> return ( JobRef $ init parts, ArtifactName $ last parts ) _ -> throwError $ "too few parts in artifact ref ‘" <> tref <> "’" _ -> throwError "too few arguments" |