jacereda / fsatrace

Filesystem access tracer
ISC License
78 stars 12 forks source link

Corruption of PATH #34

Closed ndmitchell closed 4 years ago

ndmitchell commented 5 years ago

Since https://github.com/jacereda/fsatrace/commit/4f9f599f6f200ff88d92a752f68817d166bc4b8c the first entry on $PATH is corrupted, which causes the Shake test suites to fail, e.g. https://travis-ci.org/ndmitchell/shake/jobs/574506269. The actual test adds shake_helper to the start of the $PATH. Since the above fsatrace changes that to stuff_fsatrace_needs;$PATH, and the path separator on Linux is : not ;, that corrupts the first entry in the $PATH. I guess if you want to take that route, then you should use : vs ; in a platform-specific way? Although encoding information in the $PATH freaks me out a lot (but I'm guessing you determined that nothing else would do before trying it...).

jacereda commented 4 years ago

Thanks, I #ifdefed the workaround, I think that's only true on Windows.

I'm not very proud of the workaround, if you can think of a better way just tell me.

ndmitchell commented 4 years ago

Thanks! I'll update Shake to use the latest. If it's a Windows workaround I'm less concerned - the fact crazy tricks are required on Windows when using Bash is not that surprising.