Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a bug with canonicalizePath on directory-1.1.0.0

  • Loading branch information...
commit 390753849012fe6b601a011d6ded1d88e3ad7fa7 1 parent 84fca98
@willdonnelly authored
Showing with 11 additions and 8 deletions.
  1. +11 −8 Config/Dyre.hs
View
19 Config/Dyre.hs
@@ -163,14 +163,17 @@ wrapMain params@Params{projectName = pName} cfg = withDyreOptions params $
errorData <- getErrorString params
customExists <- doesFileExist tempBinary
- -- Canonicalize the paths for comparison to avoid symlinks throwing
- -- us off. We do it here instead of earlier because canonicalizePath
- -- drops path components when one of them is nonexistent.
- thisBinary' <- canonicalizePath thisBinary
- tempBinary' <- canonicalizePath tempBinary
-
- if confExists && customExists && (thisBinary' /= tempBinary')
- then launchSub errorData tempBinary
+ if confExists && customExists
+ then do
+ -- Canonicalize the paths for comparison to avoid symlinks
+ -- throwing us off. We do it here instead of earlier because
+ -- canonicalizePath throws an exception when the file is
+ -- nonexistent.
+ thisBinary' <- canonicalizePath thisBinary
+ tempBinary' <- canonicalizePath tempBinary
+ if thisBinary' /= tempBinary'
+ then launchSub errorData tempBinary
+ else enterMain errorData
else enterMain errorData
where launchSub errorData tempBinary = do
statusOut params $ "Launching custom binary " ++ tempBinary ++ "\n"
Please sign in to comment.
Something went wrong with that request. Please try again.