git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix source map path with default output dir
commitd167155cbedb8580ae379b13c0aceda061e1b404 authorNicholas Wolverson <nicholas.wolverson@gmail.com> dateThu 25 Feb 2016, 22:40 (11 years ago) parent64a130e
1 file changed+2−2
src/Language/PureScript/Make.hs+2−2
src/Language/PureScript/Make.hs+2−2
@@ -57,7 +57,7 @@ import SourceMap
5757
5858import System.Directory
5959 (doesFileExist, getModificationTime, createDirectoryIfMissing, getCurrentDirectory)
60−import System.FilePath ((</>), takeDirectory, makeRelative, splitPath)
60+import System.FilePath ((</>), takeDirectory, makeRelative, splitPath, normalise)
6161import System.IO.Error (tryIOError)
6262import System.IO.UTF8 (readUTF8File, writeUTF8File)
6363
@@ -351,7 +351,7 @@ buildMakeActions outputDir filePathMap foreigns usePrefix =
351351
352352 genSourceMap :: String -> String -> Int -> [SMap] -> Make ()
353353 genSourceMap dir mapFile extraLines mappings = do
354− let pathToDir = iterate (".." </>) ".." !! length (splitPath outputDir)
354+ let pathToDir = iterate (".." </>) ".." !! length (splitPath $ normalise outputDir)
355355 sourceFile = case mappings of
356356 ((SMap file _ _):_) -> Just $ pathToDir </> makeRelative dir file
357357 _ -> Nothing