File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -267,10 +267,12 @@ type alias RunOptions msg =
267
267
}
268
268
269
269
270
- {-| Execute the compiler blob . The blob will write to stdout and stderr. There's currently no way
270
+ {-| Execute the compiler backend . The backend will write to stdout and stderr. There's currently no way
271
271
to redirect what is written to these streams.
272
+
273
+ The `encodedCommand` should be fed to the backend's stdin stream on initialization.
272
274
-}
273
- run : ChildProcess.Permission -> RunOptions msg -> Cmd msg
275
+ run : ChildProcess.Permission -> RunOptions msg -> { encodedCommand : String, command : Cmd msg }
274
276
run permission options =
275
277
let
276
278
commandAsJson =
@@ -284,16 +286,18 @@ run permission options =
284
286
else
285
287
Dict.singleton "NO_COLOR" "1"
286
288
in
287
- ChildProcess.spawn
288
- permission
289
- (options.pathToString options.compilerPath)
290
- [ commandAsJson ]
291
- { ( ChildProcess.defaultSpawnOptions options.onInit options.onComplete )
292
- | shell = NoShell
293
- , environmentVariables =
294
- ChildProcess.MergeWithEnvironmentVariables colorEnvVar
295
- }
296
-
289
+ { encodedCommand = commandAsJson
290
+ , command =
291
+ ChildProcess.spawn
292
+ permission
293
+ (options.pathToString options.compilerPath)
294
+ []
295
+ { ( ChildProcess.defaultSpawnOptions options.onInit options.onComplete )
296
+ | shell = NoShell
297
+ , environmentVariables =
298
+ ChildProcess.MergeWithEnvironmentVariables colorEnvVar
299
+ }
300
+ }
297
301
298
302
299
303
commandEncoder : Bool -> (Path -> String) -> Command -> Json.Value
You can’t perform that action at this time.
0 commit comments