-
Notifications
You must be signed in to change notification settings - Fork 847
Canonicalises path from withSystemTempDirectory #1019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 [email protected] 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