Problems with pcWorkingDir on macOS
- Dominant language
- Haskell
- Stars
- 91
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
Migrating from https://github.com/fpco/typed-process/issues/31
Here's a script that works differently on macOS and Linux.
```haskell
#!/usr/bin/env stack
{- stack script
--resolver=lts-15.0
--package process
-}
{-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent
import System.Exit (ExitCode(..))
import qualified System.Process as P
main :: IO ()
main = do
let cp0 = P.proc "./webapp" []
pcWorkingDir = Just "./inner"
cp = cp0 {P.cwd = pcWorkingDir}
(minH, moutH, merrH, pHandle) <- P.createProcess_ "startProcess" cp
putStrLn "> started"
threadDelay (2 * 1000000)
putStrLn "> exiting"
```
The problem is that it succeeds in running a program `./webapp` located in `./inner` dir on Linux, but fails on macOS. If you put `"./inner/webapp"` as a path on macOS, it launches it fine.
Dir where you can reproduce this in full: https://github.com/k-bx/playground/tree/master/typed-process-issue-31
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.