Fix deprecation warning with elixir 1.17 #7

Closed
Oneric wants to merge 0 commits from gitlab-mr-iid-6 into master
Member

Elixir 1.17 deprecated single quotes for charlists and a
single-quote charlist is currently used in a System.cmd call.
However there’s no reason to use a charlist here and in fact
the function specs demands binaries be used here ever since
at least Elixir 1.0.4, possibly always, so let’s follow that.

See 1.0.4’s function spec which apart from adding parentheses still matches the one from 1.17.1

cmd(binary, [binary], Keyword.t) :: {Collectable.t, exit_status :: non_neg_integer}
Elixir 1.17 deprecated single quotes for charlists and a single-quote charlist is currently used in a System.cmd call. However there’s no reason to use a charlist here and in fact the function specs demands binaries be used here ever since at least Elixir 1.0.4, possibly always, so let’s follow that. See [1.0.4’s function spec](https://hexdocs.pm/elixir/1.0.4/System.html#cmd/3) which apart from adding parentheses still matches the one from [1.17.1](https://hexdocs.pm/elixir/1.17.1/System.html#cmd/3) ``` cmd(binary, [binary], Keyword.t) :: {Collectable.t, exit_status :: non_neg_integer} ```

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma-elixir-libraries/elixir-captcha!7
No description provided.