This commit is contained in:
2019-09-15 14:08:33 -04:00
parent e1c28884f5
commit 861856a090
2 changed files with 6 additions and 10 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ Options:
-b, --bakefile PATH Custom path to a Bakefile.
-l, --list Lists available tasks from Bakefile.
--whitelist TEXT Whitelist an environment variable for
use with --secure (persists between runs).
use.
--yes Set mediumsecurity prompts to yes.
-x, --fail Fail immediately, if any task fails.
--insecure Use parent shell's environment variables.
+5 -9
View File
@@ -39,11 +39,12 @@ def indent(line):
@click.option("--debug", default=False, is_flag=True, hidden=True)
@click.option("--shellcheck", default=False, is_flag=True, hidden=False)
@click.option(
"--whitelist",
"--allow",
default=False,
nargs=1,
multiple=True,
hidden=False,
help="Whitelist an environment variable for use with --secure (persists between runs).",
help="Whitelist an environment variable for use.",
)
@click.option("--yes", is_flag=True, help="Set mediumsecurity prompts to yes.")
@click.option(
@@ -88,7 +89,7 @@ def task(
silent,
insecure,
no_color,
whitelist,
allow,
yes,
):
"""bake — the familiar Bash/Make hybrid."""
@@ -97,12 +98,7 @@ def task(
if no_color:
crayons.DISABLE_COLOR = True
if whitelist:
if debug:
click.echo(f" + config: {config!r}")
if whitelist not in config["ENVIRON_WHITELIST"]:
config["ENVIRON_WHITELIST"].append(whitelist)
config.save()
SAFE_ENVIRONS.extend(allow)
if task == "__LIST_ALL__":
_list = True