@@ -53,7 +53,7 @@ import Prelude
53
53
54
54
import Control.Alt ((<|>))
55
55
import Data.Function.Uncurried (Fn2 , runFn2 )
56
- import Data.Maybe (Maybe (..), fromMaybe )
56
+ import Data.Maybe (Maybe (..), fromMaybe , maybe )
57
57
import Data.Nullable (Nullable , toNullable , toMaybe )
58
58
import Data.Posix (Pid , Gid , Uid )
59
59
import Data.Posix.Signal (Signal )
@@ -64,6 +64,7 @@ import Effect.Exception.Unsafe (unsafeThrow)
64
64
import Foreign (Foreign )
65
65
import Foreign.Object (Object )
66
66
import Node.Buffer (Buffer )
67
+ import Node.Encoding (Encoding , encodingToNode )
67
68
import Node.FS as FS
68
69
import Node.Stream (Readable , Writable , Stream )
69
70
import Unsafe.Coerce (unsafeCoerce )
@@ -334,6 +335,8 @@ convertExecOptions :: ExecOptions -> ActualExecOptions
334
335
convertExecOptions opts = unsafeCoerce
335
336
{ cwd: fromMaybe undefined opts.cwd
336
337
, env: fromMaybe undefined opts.env
338
+ , encoding: maybe undefined encodingToNode opts.encoding
339
+ , shell: fromMaybe undefined opts.shell
337
340
, timeout: fromMaybe undefined opts.timeout
338
341
, maxBuffer: fromMaybe undefined opts.maxBuffer
339
342
, killSignal: fromMaybe undefined opts.killSignal
@@ -346,6 +349,8 @@ convertExecOptions opts = unsafeCoerce
346
349
type ExecOptions =
347
350
{ cwd :: Maybe String
348
351
, env :: Maybe (Object String )
352
+ , encoding :: Maybe Encoding
353
+ , shell :: Maybe String
349
354
, timeout :: Maybe Number
350
355
, maxBuffer :: Maybe Int
351
356
, killSignal :: Maybe Signal
@@ -358,6 +363,8 @@ defaultExecOptions :: ExecOptions
358
363
defaultExecOptions =
359
364
{ cwd: Nothing
360
365
, env: Nothing
366
+ , encoding: Nothing
367
+ , shell: Nothing
361
368
, timeout: Nothing
362
369
, maxBuffer: Nothing
363
370
, killSignal: Nothing
0 commit comments