summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-05-24 09:12:23 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2025-05-24 15:37:08 +0200
commit76370492c9c0cdbb51b4f7c14e082c04b0b223d5 (patch)
tree054e7950f8bf7c08073fafe1253c5e8f86757cf9
parent64669c18992339fa632bfea0bf13691844252777 (diff)
Unify style of single quotes in output
-rw-r--r--src/Command.hs4
-rw-r--r--src/Command/Run.hs4
-rw-r--r--src/Job.hs4
-rw-r--r--src/Main.hs14
-rw-r--r--src/Repo.hs4
5 files changed, 15 insertions, 15 deletions
diff --git a/src/Command.hs b/src/Command.hs
index 39ab675..0b1c790 100644
--- a/src/Command.hs
+++ b/src/Command.hs
@@ -119,7 +119,7 @@ getRepo :: RepoName -> CommandExec Repo
getRepo name = do
CommandExec (asks (lookup name . ciOtherRepos)) >>= \case
Just repo -> return repo
- Nothing -> tfail $ "repo `" <> textRepoName name <> "' not declared"
+ Nothing -> tfail $ "repo ‘" <> textRepoName name <> "’ not declared"
getDefaultRepo :: CommandExec Repo
getDefaultRepo = do
@@ -141,7 +141,7 @@ getEvalInput = CommandExec $ do
cmdEvalWith :: (EvalInput -> EvalInput) -> Eval a -> CommandExec a
cmdEvalWith f ev = do
- either (tfail . textEvalError) return =<< liftIO .runEval ev . f =<< getEvalInput
+ either (tfail . textEvalError) return =<< liftIO . runEval ev . f =<< getEvalInput
getOutput :: CommandExec Output
getOutput = CommandExec (asks ciOutput)
diff --git a/src/Command/Run.hs b/src/Command/Run.hs
index 0ea73b5..ce1ea4a 100644
--- a/src/Command/Run.hs
+++ b/src/Command/Run.hs
@@ -141,7 +141,7 @@ argumentJobSource names = do
jobsetJobsEither <- fmap Right $ forM names $ \name ->
case find ((name ==) . jobName) (configJobs config) of
Just job -> return job
- Nothing -> tfail $ "job `" <> textJobName name <> "' not found"
+ Nothing -> tfail $ "job ‘" <> textJobName name <> "’ not found"
oneshotJobSource . (: []) =<<
cmdEvalWith (\ei -> ei { eiCurrentIdRev = cidPart ++ eiCurrentIdRev ei })
(evalJobSet [] JobSet {..})
@@ -199,7 +199,7 @@ watchBranchSource branch = do
Just commit ->
void $ forkIO $ go commit tmvar
Nothing -> do
- T.hPutStrLn stderr $ "Branch `" <> branch <> "' not found"
+ T.hPutStrLn stderr $ "Branch ‘" <> branch <> "’ not found"
atomically $ putTMVar tmvar Nothing
return $ JobSource tmvar
diff --git a/src/Job.hs b/src/Job.hs
index 706471b..cdb12b6 100644
--- a/src/Job.hs
+++ b/src/Job.hs
@@ -337,8 +337,8 @@ runJob job uses checkoutPath jdir = do
[ path ] -> return path
found -> do
liftIO $ hPutStrLn logs $
- (if null found then "no file" else "multiple files") <> " found matching pattern `" <>
- decompile pathPattern <> "' for artifact `" <> T.unpack tname <> "'"
+ (if null found then "no file" else "multiple files") <> " found matching pattern ‘" <>
+ decompile pathPattern <> "’ for artifact ‘" <> T.unpack tname <> "’"
throwError JobFailed
let target = adir </> T.unpack tname </> takeFileName path
liftIO $ do
diff --git a/src/Main.hs b/src/Main.hs
index 0227e74..e273715 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -66,7 +66,7 @@ options =
{ optRepo = DeclaredRepo (RepoName $ T.pack repo) path : optRepo (optCommon opts)
}
}
- _ -> throwError $ "--repo: invalid value `" <> value <> "'"
+ _ -> throwError $ "--repo: invalid value ‘" <> value <> "’"
) "<repo>:<path>")
("override or declare repo path")
, Option [] [ "storage" ]
@@ -118,10 +118,10 @@ main = do
case foldl merge ( [], defaultCmdlineOptions ) os of
( [], opts ) -> return ( opts , cmdargs )
( errs, _ ) -> do
- hPutStrLn stderr $ unlines (reverse errs) <> "Try `minici --help' for more information."
+ hPutStrLn stderr $ unlines (reverse errs) <> "Try ‘minici --help’ for more information."
exitFailure
(_, _, errs) -> do
- hPutStrLn stderr $ concat errs <> "Try `minici --help' for more information."
+ hPutStrLn stderr $ concat errs <> "Try ‘minici --help’ for more information."
exitFailure
when (optShowHelp opts) $ do
@@ -159,8 +159,8 @@ main = do
| Just nc <- lookupCommand cname -> return (nc, cargs)
| otherwise -> do
hPutStr stderr $ unlines
- [ "Unknown command `" <> cname <> "'."
- , "Try `minici --help' for more information."
+ [ "Unknown command ‘" <> cname <> "’."
+ , "Try ‘minici --help’ for more information."
]
exitFailure
@@ -217,7 +217,7 @@ runSomeCommand rootPath gopts (SC tproxy) args = do
let ciOptions = optCommon gopts
let exitWithErrors errs = do
- hPutStrLn stderr $ concat errs <> "Try `minici " <> commandName tproxy <> " --help' for more information."
+ hPutStrLn stderr $ concat errs <> "Try ‘minici " <> commandName tproxy <> " --help’ for more information."
exitFailure
(opts, cmdargs) <- case getOpt Permute (fullCommandOptions tproxy) args of
@@ -245,7 +245,7 @@ runSomeCommand rootPath gopts (SC tproxy) args = do
Just repo -> return ( repoName decl, repo )
Nothing -> do
absPath <- makeAbsolute path
- hPutStrLn stderr $ "Failed to open repo `" <> showRepoName (repoName decl) <> "' at " <> repoPath decl <> " (" <> absPath <> ")"
+ hPutStrLn stderr $ "Failed to open repo ‘" <> showRepoName (repoName decl) <> "’ at " <> repoPath decl <> " (" <> absPath <> ")"
exitFailure
cmdlineRepos <- forM (optRepo ciOptions) (openDeclaredRepo "")
diff --git a/src/Repo.hs b/src/Repo.hs
index 700c61b..98178e6 100644
--- a/src/Repo.hs
+++ b/src/Repo.hs
@@ -173,14 +173,14 @@ mkCommit commitRepo commitId_ = do
readCommit :: (MonadIO m, MonadFail m) => Repo -> Text -> m Commit
readCommit repo@GitRepo {..} ref = maybe (fail err) return =<< tryReadCommit repo ref
- where err = "revision `" <> T.unpack ref <> "' not found in `" <> gitDir <> "'"
+ where err = "revision ‘" <> T.unpack ref <> "’ not found in ‘" <> gitDir <> "’"
tryReadCommit :: (MonadIO m, MonadFail m) => Repo -> Text -> m (Maybe Commit)
tryReadCommit repo ref = sequence . fmap (mkCommit repo . CommitId) =<< tryReadObjectId repo "commit" ref
readTree :: (MonadIO m, MonadFail m) => Repo -> FilePath -> Text -> m Tree
readTree repo@GitRepo {..} subdir ref = maybe (fail err) return =<< tryReadTree repo subdir ref
- where err = "tree `" <> T.unpack ref <> "' not found in `" <> gitDir <> "'"
+ where err = "tree ‘" <> T.unpack ref <> "’ not found in ‘" <> gitDir <> "’"
tryReadTree :: (MonadIO m, MonadFail m) => Repo -> FilePath -> Text -> m (Maybe Tree)
tryReadTree treeRepo treeSubdir ref = do