summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-01-30 21:19:01 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-01-30 21:19:01 +0100
commit9eec4cd48404587c939cf2f45a082bba01b47ed9 (patch)
tree6baacf11a66d49402e6f22834a975cbc46036f07
parenta2ed08ffac20c1de5cc2339b22f81f8b15ccaf18 (diff)
Fix invocation of `minici run` without arguments
Changelog: Fix invocation of `minici run` without arguments
-rw-r--r--src/Command/Run.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Command/Run.hs b/src/Command/Run.hs
index f93e619..45056f5 100644
--- a/src/Command/Run.hs
+++ b/src/Command/Run.hs
@@ -176,7 +176,10 @@ cmdRun (RunCommand RunOptions {..} args) = do
T.hPutStrLn stderr $ "No repository found at `" <> T.pack absPath <> "'"
exitFailure
- ranges <- forM (args ++ roRanges) $ \changeset -> do
+ let args' | null args, null roRanges, null roNewCommitsOn, null roNewTags = [ "HEAD" ]
+ | otherwise = args
+
+ ranges <- forM (args' ++ roRanges) $ \changeset -> do
( base, tip ) <- case T.splitOn ".." changeset of
base : tip : _ -> return ( base, tip )
[ param ] -> liftIO $ do