Burrito.Util.Args (burrito v1.2.0)
This module provides a method to help fetch CLI arguments, whether passed down from the Zig wrapper binary or from the the system.
Summary
Functions
Get the arguments from the CLI, regardless if run under Burrito or not.
Get CLI arguments passed down from the Zig wrapper binary. Do note that this will get OTP
runtime arguments when called outside of a Burrito-built context. You may consider
argv/0
as a more general alternative.
Returns the path of the wrapper binary that launched this application.
If not currently inside a Burrito wrapped application, returns :not_in_burrito
.
Functions
argv()
@spec argv() :: [String.t()]
Get the arguments from the CLI, regardless if run under Burrito or not.
get_arguments()
@spec get_arguments() :: [String.t()]
Get CLI arguments passed down from the Zig wrapper binary. Do note that this will get OTP
runtime arguments when called outside of a Burrito-built context. You may consider
argv/0
as a more general alternative.
get_bin_path()
@spec get_bin_path() :: binary() | :not_in_burrito
Returns the path of the wrapper binary that launched this application.
If not currently inside a Burrito wrapped application, returns :not_in_burrito
.