Current section
Files
Jump to
Current section
Files
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]).
-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).