From 6c55dc12b06c6adf0fa27f48da4018e00d4fb542 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Sun, 3 May 2020 19:34:37 -0700 Subject: Output a message if no executables or tests are found --- src/Fpm.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3