From 7be7dc7216accf2dc76c2725266f58461bfbf656 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Mon, 13 Apr 2020 21:15:45 -0500 Subject: Make running the executables work on Windows too --- src/Fpm.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Fpm.hs b/src/Fpm.hs index c3c3794..070f9e5 100644 --- a/src/Fpm.hs +++ b/src/Fpm.hs @@ -16,7 +16,10 @@ import Development.Shake ( FilePattern , () , getDirectoryFilesIO ) -import Development.Shake.FilePath ( () ) +import Development.Shake.FilePath ( () + , (<.>) + , exe + ) import Options.Applicative ( Parser , (<**>) , command @@ -92,7 +95,8 @@ app args settings = case command' args of sourceDir name ) (appSettingsExecutables settings) - let executables = map (buildPrefix ) executableNames + let executables = + map (buildPrefix ) $ map (flip (<.>) exe) executableNames mapM_ runCommand executables Test -> do build settings @@ -103,7 +107,8 @@ app args settings = case command' args of sourceDir name ) (appSettingsTests settings) - let executables = map (buildPrefix ) executableNames + let executables = + map (buildPrefix ) $ map (flip (<.>) exe) executableNames mapM_ runCommand executables build :: AppSettings -> IO () -- cgit v1.2.3