Skip to content

Commit

Permalink
Update stdout function
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisbcc committed Jul 19, 2024
1 parent 5051e6b commit d51d4ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/System/Hapistrano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ initConfig getLine' = do
configFilePath <- (FilePath.</> "hap.yml") <$> Directory.getCurrentDirectory
alreadyExisting <- Directory.doesFileExist configFilePath
when alreadyExisting $ do
hPutStrLn stderr "'hap.yml' already exists"
putStrLn "'hap.yml' already exists"
exitFailure

putStrLn "Creating 'hap.yml'"
Expand All @@ -296,7 +296,7 @@ initConfig getLine' = do
pure def
else
either
(\err -> hPutStrLn stderr (M.errorBundlePretty err) >> prompt parameterName def parser)
(\err -> putStrLn (M.errorBundlePretty err) >> prompt parameterName def parser)
pure
(M.parse (parser <* M.eof) "" userInput)

Expand All @@ -307,7 +307,7 @@ initConfig getLine' = do
_ -> Nothing

prompt' :: String -> IO String
prompt' title = hPutStrLn stderr title >> getLine'
prompt' title = putStrLn title >> getLine'

generateUserConfig :: IO InitTemplateConfig -> IO InitTemplateConfig
generateUserConfig initCfg = do
Expand Down

0 comments on commit d51d4ef

Please sign in to comment.