alco / alco/porcelain

error condition not properly documented for Porcelain.spawn

未关闭
#56 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Elixir
星标
958
派生
45
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。