Skip to content

"Impossible:" errors whenever a command to be run doesn't exist #65

@Hi-Angel

Description

@Hi-Angel

In practice I see quite often an error:

Impossible: `spawnSync` child process neither exited nor was killed.

Looks quite possible… Further digging shows that this is due ChildProcess logic not accounting for both status and signal to be null for valid reasons (which may also be some system error, not just "command not found").

Steps to reproduce

Execute this code:

module Main where

import Prelude

import Effect (Effect)
import Effect.Console (logShow)
import Node.ChildProcess (spawnSync') as Proc

main :: Effect Unit
main = do
  ret <- Proc.spawnSync' "non-existing-cmd" [] identity
  logShow ret.error

Expected

(Just Error: spawnSync non-existing-cmd ENOENT)

Actual

A crash with Impossible: spawnSync child process neither exited nor was killed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions