From 9eec4cd48404587c939cf2f45a082bba01b47ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 30 Jan 2025 21:19:01 +0100 Subject: Fix invocation of `minici run` without arguments Changelog: Fix invocation of `minici run` without arguments --- src/Command/Run.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Command/Run.hs') 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 -- cgit v1.2.3