aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilan Curcic <caomaco@gmail.com>2020-05-04 08:30:27 -0400
committerGitHub <noreply@github.com>2020-05-04 08:30:27 -0400
commitcf23a1342224a26a4aa42f4582bf00d1c6444e7c (patch)
tree9cdde8c9193aa5d07259c3c9b01fbf830ebf6a82 /src
parented5dd080d45ea4a409e63a5f9b2ff26f1d82d2db (diff)
parent6c55dc12b06c6adf0fa27f48da4018e00d4fb542 (diff)
downloadfpm-cf23a1342224a26a4aa42f4582bf00d1c6444e7c.tar.gz
fpm-cf23a1342224a26a4aa42f4582bf00d1c6444e7c.zip
Merge pull request #73 from everythingfunctional/OutputForEmptyRunOrTest
Output a message if no executables or tests are found
Diffstat (limited to 'src')
-rw-r--r--src/Fpm.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Fpm.hs b/src/Fpm.hs
index afe9a70..6bd6abb 100644
--- a/src/Fpm.hs
+++ b/src/Fpm.hs
@@ -99,7 +99,9 @@ app args settings = case command' args of
let executables =
map (buildPrefix </>) $ map (flip (<.>) exe) executableNames
canonicalExecutables <- mapM makeAbsolute executables
- mapM_ runCommand canonicalExecutables
+ case canonicalExecutables of
+ [] -> putStrLn "No Executables Found"
+ _ -> mapM_ runCommand canonicalExecutables
Test -> do
build settings
let buildPrefix = appSettingsBuildPrefix settings
@@ -112,7 +114,9 @@ app args settings = case command' args of
let executables =
map (buildPrefix </>) $ map (flip (<.>) exe) executableNames
canonicalExecutables <- mapM makeAbsolute executables
- mapM_ runCommand canonicalExecutables
+ case canonicalExecutables of
+ [] -> putStrLn "No Tests Found"
+ _ -> mapM_ runCommand canonicalExecutables
build :: AppSettings -> IO ()
build settings = do