Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error condition not properly documented for Porcelain.spawn #56

Open
sudeepdino008 opened this issue Oct 11, 2022 · 0 comments
Open

error condition not properly documented for Porcelain.spawn #56

sudeepdino008 opened this issue Oct 11, 2022 · 0 comments

Comments

@sudeepdino008
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant