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