Packages

A tool to audit Erlang & Elixir dependencies, to make sure your Gleam ✨ projects really sparkle!

Retired package: Security issue - Vulnerability warnings were never emitted due to an inverted advisory filter. Upgrade to 3.3.1 or 4.0.0-rc2+.

Current section

Files

Jump to
go_over src go_over@util@util.erl
Raw

src/go_over@util@util.erl

-module(go_over@util@util).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-define(FILEPATH, "src/go_over/util/util.gleam").
-export([retry_cmd/2, do_panic/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(false).
-file("src/go_over/util/util.gleam", 4).
?DOC(false).
-spec retry_cmd(binary(), list(binary())) -> {ok, binary()} |
{error, {integer(), binary()}}.
retry_cmd(Cmd, Args) ->
_pipe = delay:delay_effect(
fun() -> shellout:command(Cmd, Args, <<"."/utf8>>, []) end
),
_pipe@1 = delay:retry_with_backoff(_pipe, 3),
delay:run(_pipe@1).
-file("src/go_over/util/util.gleam", 15).
?DOC(false).
-spec do_panic() -> any().
do_panic() ->
erlang:error(#{gleam_error => panic,
message => <<"Unreachable, please create an issue in https://github.com/bwireman/go-over if you see this"/utf8>>,
file => <<?FILEPATH/utf8>>,
module => <<"go_over/util/util"/utf8>>,
function => <<"do_panic"/utf8>>,
line => 16}).