@@ -10,7 +10,7 @@ import Effect.Aff (Aff, Error, effectCanceler, error, makeAff, throwError)
1010import Effect.Class (liftEffect)
1111import Node.Buffer (Buffer, freeze)
1212import Node.Buffer.Immutable as ImmutableBuffer
13−import Node.ChildProcess (ExecResult, Exit(..), defaultExecOptions, defaultSpawnOptions, inherit)
13+import Node.ChildProcess (ChildProcess, ExecResult, Exit(..), defaultExecOptions)
1414import Node.ChildProcess as ChildProcess
1515import Node.Encoding (Encoding(..))
1616import Node.FS.Aff as FS
@@ -24,7 +24,7 @@ import Node.Stream as Stream
2424
2525spawnFromParent :: String -> Array String -> Aff Unit
2626spawnFromParent command args = makeAff \k -> do
27− childProc <- ChildProcess.spawn command args defaultSpawnOptions { stdio = inherit }
27+ childProc <- spawnImpl command args
2828 ChildProcess.onExit childProc case _ of
2929 Normally code
3030 | code > 0 -> Process.exit code
@@ -47,6 +47,9 @@ bufferToUTF8 = liftEffect <<< map (ImmutableBuffer.toString UTF8) <<< freeze
4747mkdirp :: FilePath -> Aff Unit
4848mkdirp path = FS.mkdir' path { recursive: true, mode: mkPerms Perms.all Perms.all Perms.all }
4949
50+-- This is needed because node-child-process is missing the "shell" option.
51+foreign import spawnImpl :: String -> Array String -> Effect ChildProcess
52+
5053foreign import loadModuleMainImpl :: (Error -> Effect Unit) -> (Effect Unit -> Effect Unit) -> Effect Unit -> FilePath -> Effect Unit
5154
5255loadModuleMain :: FilePath -> Aff (Maybe (Effect Unit))