Inconsistent behavior for relative paths in runProcess
|Reported by:||snoyberg||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
This was initially reported as a bug in cabal:
The relevant fix demonstrates the issue:
It seems that on Linux, a relative path for the executable is derived from the new working directory, whereas on Mac it is derived from the old working directory. (I have not tested on other systems.) Ideally, the behavior would be consistent across OSes, which IMO the more intuitive behavior being the current Mac behavior. The simplest solution would be to always turn the relative paths into absolute paths before changing working directories. However, doing so may introduce a performance hit.
Alternatively, a documentation fix would be good so that it's at least obvious that behavior is platform-specific. I can write a patch for either the change in behavior or the updated documentation, I'd just like to know which is preferred.
Change History (6)
comment:1 Changed 3 years ago by igloo
- difficulty set to Unknown
- Milestone set to 7.8.1
- Status changed from new to infoneeded
comment:5 Changed 3 years ago by igloo
- Resolution set to worksforme
- Status changed from infoneeded to closed