Skip to content

Commit

Permalink
Merge pull request #7485 from haskell/emily/redundant-init-warning-pa…
Browse files Browse the repository at this point in the history
…ckagename

Remove redundant init message for hackage dir name
  • Loading branch information
emilypi authored Jul 15, 2021
2 parents 3c4023f + 1af8128 commit ec3cf26
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ createProject v pkgIx srcDb initFlags = do
return $ ProjectSettings
(mkOpts comments cabalSpec) pkgDesc (Just libTarget)
(Just exeTarget) testTarget

TestSuite -> do
-- the line below is necessary because if both package type and test flags
-- are *not* passed, the user will be prompted for a package type (which
-- includes TestSuite in the list). It prevents that the user end up with a
-- TestSuite target with initializeTestSuite set to NoFlag, thus avoiding the prompt.
let initFlags' = initFlags { initializeTestSuite = Flag True }
testTarget <- genTestTarget initFlags' pkgIx

comments <- noCommentsPrompt initFlags'

return $ ProjectSettings
Expand Down Expand Up @@ -308,9 +308,7 @@ packageNamePrompt srcDb flags = getPackageName flags $ do
then do
don'tUseName <- promptYesNo (promptOtherNameMsg n) (DefaultPrompt True)
if don'tUseName
then do
putStrLn (inUseMsg n)
go defName
then go defName
else return n
else return n

Expand Down

0 comments on commit ec3cf26

Please sign in to comment.