@@ -99,7 +99,7 @@ data CabalInstallException
99
99
| UnknownExecutable String UnitId
100
100
| MultipleMatchingExecutables String [String ]
101
101
| CmdRunReportTargetProblems String
102
- | CleanAction [String ]
102
+ | CleanActionNotScript [String ]
103
103
| ReportCannotPruneDependencies String
104
104
| ReplCommandDoesn'tSupport
105
105
| ReplTakesNoArguments [String ]
@@ -192,6 +192,7 @@ data CabalInstallException
192
192
| LegacyAndParsecParseResultsDiffer FilePath String String
193
193
| CabalFileParseFailure CabalFileParseError
194
194
| ProjectConfigParseFailure ProjectConfigParseError
195
+ | CleanActionNotPackage
195
196
deriving (Show )
196
197
197
198
exceptionCodeCabalInstall :: CabalInstallException -> Int
@@ -255,7 +256,7 @@ exceptionCodeCabalInstall e = case e of
255
256
UnknownExecutable {} -> 7068
256
257
MultipleMatchingExecutables {} -> 7069
257
258
CmdRunReportTargetProblems {} -> 7070
258
- CleanAction {} -> 7071
259
+ CleanActionNotScript {} -> 7071
259
260
ReportCannotPruneDependencies {} -> 7072
260
261
ReplCommandDoesn'tSupport {} -> 7073
261
262
ReplTakesNoArguments {} -> 7074
@@ -348,6 +349,7 @@ exceptionCodeCabalInstall e = case e of
348
349
LegacyAndParsecParseResultsDiffer {} -> 7165
349
350
CabalFileParseFailure {} -> 7166
350
351
ProjectConfigParseFailure {} -> 7167
352
+ CleanActionNotPackage {} -> 7168
351
353
352
354
exceptionMessageCabalInstall :: CabalInstallException -> String
353
355
exceptionMessageCabalInstall e = case e of
@@ -458,7 +460,7 @@ exceptionMessageCabalInstall e = case e of
458
460
++ " :\n "
459
461
++ unlines elabUnitId
460
462
CmdRunReportTargetProblems renderProb -> renderProb
461
- CleanAction notScripts ->
463
+ CleanActionNotScript notScripts ->
462
464
" 'clean' extra arguments should be script files: "
463
465
++ unwords notScripts
464
466
ReportCannotPruneDependencies renderCannotPruneDependencies -> renderCannotPruneDependencies
@@ -885,6 +887,8 @@ exceptionMessageCabalInstall e = case e of
885
887
renderCabalFileParseError cbfError
886
888
ProjectConfigParseFailure pcfError ->
887
889
renderProjectConfigParseError pcfError
890
+ CleanActionNotPackage ->
891
+ " Not a cabal project or package directory; skipping project cleanup."
888
892
889
893
instance Exception (VerboseException CabalInstallException ) where
890
894
displayException :: VerboseException CabalInstallException -> [Char ]
0 commit comments