Canonicalises path from withSystemTempDirectory#1019
Canonicalises path from withSystemTempDirectory#1019robstewart57 wants to merge 2 commits intocommercialhaskell:masterfrom
Conversation
… Stack.Setup The System.IO.Temp withSystemTempDirectory function from System.IO.Temp used in Stack.Setup returns a non-canonicalised path. However, the parseAbsDir function in the Path module of the path library expects canonicalised paths. The change is applied to stack setup, `sanityCheck` and stack upgrade in Stack.Setup . Fixes commercialhaskell#1017
|
Hang off accepting this PR actually, this same problem is causing a problem elsewhere. More anon... |
… Stack.Build.Execute Relates to 7be7843 , which fixes the same instances of this pattern, in Stack.Setup . This does appear to fix commercialhaskell#1017 .
|
Looks good. One thought: perhaps instead of modifying each place in the code, we could add a By any change, do you have a temporary directory environment variable set to a relative path? |
|
@snoyberg thanks for the review, and I agree. Rather than moving a version of If this gets accepted to temporary, I have a corresponding stack commit that uses the So I'm closing this PR. |
|
Actually, Path.IO is in stack itself, so it could just be added here. I'd still recommend going that route, as it will be easier to deal with dependencies that way. |
|
@snoyberg ah ha! I've got to the bottom of this bug. It's a really interesting corner case. The
I've looked into my The bib2texhtml documentation says to do this:
The path starting "." is eventually passed back to stack in all places where @snoyberg What do think is the best resolution?
|
|
I'd still say 3 is the right approach. Just to be clear though, I don't On Wed, Sep 23, 2015, 12:01 AM Rob Stewart notifications@github.com wrote:
|
When the $TMPDIR environment variable is set, the directory paths provided by `withSystemTempDirectory` and `withTempDirectory` from System.IO.Temp provided by the temporary library are not canonicalised. This commit wraps these functions into canonicalized versions. See an earlier PR for discussion commercialhaskell#1019 Fixes commercialhaskell#1017
|
Done #1047 . |
When the $TMPDIR environment variable is set, the directory paths provided by `withSystemTempDirectory` and `withTempDirectory` from System.IO.Temp provided by the temporary library are not canonicalised. This commit wraps these functions into canonicalized versions. See an earlier PR for discussion commercialhaskell#1019 Fixes commercialhaskell#1017
… Stack.Setup
The System.IO.Temp withSystemTempDirectory function from
System.IO.Temp used in Stack.Setup returns a non-canonicalised
path. However, the parseAbsDir function in the Path module of the path
library expects canonicalised paths.
The change is applied to stack setup,
sanityCheckand stack upgradein Stack.Setup .
Fixes #1017