From 505ae1c65bae537f386a3dc4f8d5d1c154c8f5c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Roman=20Smr=C5=BE?= <roman.smrz@seznam.cz>
Date: Wed, 19 Mar 2025 21:33:11 +0100
Subject: Add --storage command line option

---
 src/Command/Run.hs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'src/Command')

diff --git a/src/Command/Run.hs b/src/Command/Run.hs
index 7c6162a..905204e 100644
--- a/src/Command/Run.hs
+++ b/src/Command/Run.hs
@@ -15,7 +15,6 @@ import Data.Text qualified as T
 import Data.Text.IO qualified as T
 
 import System.Console.GetOpt
-import System.FilePath
 import System.FilePath.Glob
 import System.IO
 
@@ -194,8 +193,7 @@ cmdRun :: RunCommand -> CommandExec ()
 cmdRun (RunCommand RunOptions {..} args) = do
     CommonOptions {..} <- getCommonOptions
     tout <- getTerminalOutput
-    configPath <- getConfigPath
-    let baseDir = takeDirectory configPath
+    storageDir <- getStorageDir
 
     ( rangeOptions, jobOptions ) <- partitionEithers . concat <$> sequence
         [ forM roRanges $ \range -> case T.splitOn ".." range of
@@ -232,7 +230,7 @@ cmdRun (RunCommand RunOptions {..} args) = do
     tags <- mapM watchTagSource roNewTags
 
     liftIO $ do
-        mngr <- newJobManager (baseDir </> ".minici") optJobs
+        mngr <- newJobManager storageDir optJobs
 
         source <- mergeSources $ concat [ [ argumentJobs ], ranges, branches, tags ]
         headerLine <- newLine tout ""
-- 
cgit v1.2.3