-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 => <>, module => <<"go_over/util/util"/utf8>>, function => <<"do_panic"/utf8>>, line => 16}).