From e713e6de0de187a4c3c4c26c6551033d66a84878 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sat, 22 Oct 2016 13:37:58 +0200 Subject: [PATCH] Improve error message for missing Cabal file. --- src/Stack/Types/Package.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Stack/Types/Package.hs b/src/Stack/Types/Package.hs index 2e13362653..cb2f63eca0 100644 --- a/src/Stack/Types/Package.hs +++ b/src/Stack/Types/Package.hs @@ -66,9 +66,12 @@ instance Show PackageException where Just file -> ' ' : toFilePath file) ++ ": " ++ show err - show (PackageNoCabalFileFound dir) = - "No .cabal file found in directory " ++ - toFilePath dir + show (PackageNoCabalFileFound dir) = concat + [ "Stack looks for packages in the directories configured in" + , " the 'packages' variable defined in your stack.yaml\n" + , "The current entry points to " ++ toFilePath dir ++ + " but no .cabal file could be found there." + ] show (PackageMultipleCabalFilesFound dir files) = "Multiple .cabal files found in directory " ++ toFilePath dir ++