alco / alco/porcelain

error condition not properly documented for Porcelain.spawn

Open
#56 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
958
Forks
45
PR merge metrics
No merged PRs in 30d

Description

For some cases, Porcelain.spawn returns data of structure `{:error, }`. E.g:

```elixir
iex(23)> Porcelain.spawn("whoami2", [])
{:error, "Command not found: whoami2"}
```

But the spec doesn't capture it:

```elixir
@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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.