make trySpawnSync return the stdout
This commit is contained in:
@@ -88,13 +88,18 @@
|
|||||||
options ,options
|
options ,options
|
||||||
result (ChildProcess.spawnSync command args options)]
|
result (ChildProcess.spawnSync command args options)]
|
||||||
(if result.error
|
(if result.error
|
||||||
{(,onError "Error $result.error from $command ${args}: $result.stdout $result.stderr")(return)}
|
{
|
||||||
|
(,onError "Error $result.error from $command ${args}: $result.stdout $result.stderr")
|
||||||
|
null
|
||||||
|
}
|
||||||
(case result.status
|
(case result.status
|
||||||
(0 null)
|
(0 (when result.stdout (.toString (the js.node.Buffer result.stdout))))
|
||||||
(errCode
|
(errCode
|
||||||
(,onError "Error code $errCode from $command ${args}: $result.stdout $result.stderr")
|
(,onError "Error code $errCode from $command ${args}: $result.stdout $result.stderr")
|
||||||
(return))
|
null)
|
||||||
(null (,onError "result status is null from $command ${args}: $result.stdout $result.stderr"))))))
|
(null
|
||||||
|
(,onError "result status is null from $command ${args}: $result.stdout $result.stderr")
|
||||||
|
null)))))
|
||||||
|
|
||||||
(function :Void showCompileError [errorMessage]
|
(function :Void showCompileError [errorMessage]
|
||||||
(ifLet [compileErrors (R.distinctMatches
|
(ifLet [compileErrors (R.distinctMatches
|
||||||
|
Reference in New Issue
Block a user