aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Richardson <brichardson@structint.com>2020-04-21 19:34:52 -0700
committerBrad Richardson <brichardson@structint.com>2020-04-29 19:08:05 -0700
commitd6e5d3055946e58bd17dfc156bcffe88ef08b5dd (patch)
tree787ab0d77c9db8a6c2982cd1b994e7bf88731f5f /src
parent7be7dc7216accf2dc76c2725266f58461bfbf656 (diff)
downloadfpm-d6e5d3055946e58bd17dfc156bcffe88ef08b5dd.tar.gz
fpm-d6e5d3055946e58bd17dfc156bcffe88ef08b5dd.zip
Canonicalize the executables so they will hopefully work on Windows
Diffstat (limited to 'src')
-rw-r--r--src/Fpm.hs7
1 files changed, 5 insertions, 2 deletions
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