Skip to content

error condition not properly documented for Porcelain.spawn #56

@sudeepdino008

Description

@sudeepdino008

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions