Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit b775f13

Browse files
committed
Prefer canonicalisePath over normalise
1 parent 97e6617 commit b775f13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hie-plugin-api/Haskell/Ide/Engine/Cradle.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Data.Function ((&))
1313
import qualified Data.List.NonEmpty as NonEmpty
1414
import Data.List.NonEmpty (NonEmpty)
1515
import System.FilePath
16-
import System.Directory (getCurrentDirectory)
16+
import System.Directory (getCurrentDirectory, canonicalizePath)
1717
import qualified Data.Map as M
1818
import Data.List (sortOn, find)
1919
import Data.Maybe (listToMaybe, mapMaybe, isJust)
@@ -128,7 +128,7 @@ cabalHelperCradle file = do
128128
debugm $ "Cabal-Helper cradle package: " ++ show realPackage
129129
-- Field `pSourceDir` often has the form `<cwd>/./plugin`
130130
-- but we only want `<cwd>/plugin`
131-
let normalisedPackageLocation = normalise $ pSourceDir realPackage
131+
normalisedPackageLocation <- canonicalizePath $ pSourceDir realPackage
132132
debugm
133133
$ "Cabal-Helper normalisedPackageLocation: "
134134
++ normalisedPackageLocation

0 commit comments

Comments
 (0)