From d6e5d3055946e58bd17dfc156bcffe88ef08b5dd Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 21 Apr 2020 19:34:52 -0700 Subject: Canonicalize the executables so they will hopefully work on Windows --- src/Fpm.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fpm.hs b/src/Fpm.hs index 070f9e5..afe9a70 100644 --- a/src/Fpm.hs +++ b/src/Fpm.hs @@ -36,6 +36,7 @@ import Options.Applicative ( Parser ) import System.Directory ( doesDirectoryExist , doesFileExist + , makeAbsolute ) import System.Process ( runCommand ) import Toml ( TomlCodec @@ -97,7 +98,8 @@ app args settings = case command' args of (appSettingsExecutables settings) let executables = map (buildPrefix ) $ map (flip (<.>) exe) executableNames - mapM_ runCommand executables + canonicalExecutables <- mapM makeAbsolute executables + mapM_ runCommand canonicalExecutables Test -> do build settings let buildPrefix = appSettingsBuildPrefix settings @@ -109,7 +111,8 @@ app args settings = case command' args of (appSettingsTests settings) let executables = map (buildPrefix ) $ map (flip (<.>) exe) executableNames - mapM_ runCommand executables + canonicalExecutables <- mapM makeAbsolute executables + mapM_ runCommand canonicalExecutables build :: AppSettings -> IO () build settings = do -- cgit v1.2.3