@@ -53,7 +53,7 @@ import Prelude
5353
5454import Control.Alt ((<|>))
5555import Data.Function.Uncurried (Fn2 , runFn2 )
56- import Data.Maybe (Maybe (..), fromMaybe )
56+ import Data.Maybe (Maybe (..), fromMaybe , maybe )
5757import Data.Nullable (Nullable , toNullable , toMaybe )
5858import Data.Posix (Pid , Gid , Uid )
5959import Data.Posix.Signal (Signal )
@@ -64,6 +64,7 @@ import Effect.Exception.Unsafe (unsafeThrow)
6464import Foreign (Foreign )
6565import Foreign.Object (Object )
6666import Node.Buffer (Buffer )
67+ import Node.Encoding (Encoding , encodingToNode )
6768import Node.FS as FS
6869import Node.Stream (Readable , Writable , Stream )
6970import Unsafe.Coerce (unsafeCoerce )
@@ -334,6 +335,8 @@ convertExecOptions :: ExecOptions -> ActualExecOptions
334335convertExecOptions opts = unsafeCoerce
335336 { cwd: fromMaybe undefined opts.cwd
336337 , env: fromMaybe undefined opts.env
338+ , encoding: maybe undefined encodingToNode opts.encoding
339+ , shell: fromMaybe undefined opts.shell
337340 , timeout: fromMaybe undefined opts.timeout
338341 , maxBuffer: fromMaybe undefined opts.maxBuffer
339342 , killSignal: fromMaybe undefined opts.killSignal
@@ -346,6 +349,8 @@ convertExecOptions opts = unsafeCoerce
346349type ExecOptions =
347350 { cwd :: Maybe String
348351 , env :: Maybe (Object String )
352+ , encoding :: Maybe Encoding
353+ , shell :: Maybe String
349354 , timeout :: Maybe Number
350355 , maxBuffer :: Maybe Int
351356 , killSignal :: Maybe Signal
@@ -358,6 +363,8 @@ defaultExecOptions :: ExecOptions
358363defaultExecOptions =
359364 { cwd: Nothing
360365 , env: Nothing
366+ , encoding: Nothing
367+ , shell: Nothing
361368 , timeout: Nothing
362369 , maxBuffer: Nothing
363370 , killSignal: Nothing
0 commit comments