chore: Add :env to helper documentation
This commit is contained in:
parent
dbb6241c40
commit
9c6888b694
1 changed files with 11 additions and 3 deletions
|
@ -3,8 +3,13 @@ defmodule Mash.Helpers do
|
|||
Helpers that provide a simple way to write Mash configs.
|
||||
"""
|
||||
|
||||
@doc "Create a run function for a job that executes a mix task with name `task_name` and the arguments `args`"
|
||||
@spec mix(String.t(), [String.t()]) :: function()
|
||||
@doc """
|
||||
Create a run function for a job that executes a mix task with name `task_name` and the arguments `args`.
|
||||
|
||||
Available opts:
|
||||
- `:env` -- a list of {key, value} pairs that will be used as environment variables.
|
||||
"""
|
||||
@spec mix(String.t(), [String.t()], Keyword.t()) :: function()
|
||||
def mix(task_name, args \\ [], opts \\ []) do
|
||||
env = Keyword.get(opts, :env, [])
|
||||
|
||||
|
@ -21,8 +26,11 @@ defmodule Mash.Helpers do
|
|||
|
||||
@doc """
|
||||
Create a run function which executes the script/binary named `command` with the arguments `args`.
|
||||
|
||||
Available opts:
|
||||
- `:env` -- a list of {key, value} pairs that will be used as environment variables.
|
||||
"""
|
||||
@spec shell(String.t(), [String.t()]) :: function()
|
||||
@spec shell(String.t(), [String.t()], Keyword.t()) :: function()
|
||||
def shell(command, args \\ [], opts \\ []) do
|
||||
env = Keyword.get(opts, :env, [])
|
||||
|
||||
|
|
Loading…
Reference in a new issue