error condition not properly documented for Porcelain.spawn
sudeepdino008 opened this issue · comments
sudeep commented
For some cases, Porcelain.spawn returns data of structure {:error, <reason>}
. E.g:
iex(23)> Porcelain.spawn("whoami2", [])
{:error, "Command not found: whoami2"}
But the spec doesn't capture it:
@spec spawn(binary, [binary]) :: Porcelain.Process.t
@spec spawn(binary, [binary], Keyword.t) :: Porcelain.Process.t
def spawn(prog, args, options \\ [])
leading to little annoyances like warning messages about pattern matching with the error msg type.