@@ -158,7 +158,7 @@ type Msg
158158 | CompilerInstalled (Result FileSystem.Error Path)
159159 | CompilerInitialized { quiet : Bool, backendStreams : ChildProcess.StreamIO, encodedCommand : Bytes }
160160 | CompilerRan Int
161- | CompiledForRun { path : String , exitCode : Int }
161+ | CompiledForRun { path : Path , exitCode : Int }
162162 | RunStarted Process.Id
163163 | RunExited Int
164164 | RedirectTerminalIO
@@ -270,13 +270,15 @@ update msg model =
270270 Terminal.Run.run
271271 { cpPermission = model.cpPermission
272272 , fsPermission = model.fsPermission
273+ , pathToString = model.pathToString
273274 , path = path
274275 , onInit = RunStarted
275276 , onExit = RunExited
276277 }
277278 |> Task.onError
278279 (\error ->
279280 -- TODO: Terminal.Run.errorToString
281+ -- TODO: Why am I not seeing the write to stderr?
280282 Stream.Log.line model.stderr (Debug.toString error)
281283 |> Task.map (\_ -> Node.exitWithCode 1)
282284 )
@@ -485,14 +487,15 @@ parseUserArgs model compilerPath =
485487 )
486488 |> Task.executeCmd
487489
488- CliParser.Run moduleName ->
490+ CliParser.Run opts ->
489491 Terminal.Run.make
490492 { fsPermission = model.fsPermission
491493 , cpPermission = model.cpPermission
492494 , useColor = model.useColor
493495 , compilerPath = compilerPath
494496 , pathToString = model.pathToString
495- , moduleName = moduleName
497+ , moduleName = opts.moduleName
498+ , package = opts.package
496499 , onBackendInitialized =
497500 (\{ backendStreams, encodedCommand } ->
498501 CompilerInitialized
@@ -504,7 +507,7 @@ parseUserArgs model compilerPath =
504507 , onCompiled =
505508 (\outputPath exitCode ->
506509 CompiledForRun
507- { path = model.pathToString outputPath
510+ { path = outputPath
508511 , exitCode = exitCode
509512 }
510513 )
0 commit comments