-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add env var for --non-interactive flag
Change --non-interactive action to utils.EnvironmentDefault to support specification as an env var
- Loading branch information
Showing
2 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,11 +201,13 @@ def register_argparse_arguments(parser: argparse.ArgumentParser) -> None: | |
) | ||
parser.add_argument( | ||
"--non-interactive", | ||
action="store_true", | ||
action=utils.EnvironmentDefault, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
sco1
Author
Contributor
|
||
env="TWINE_NON_INTERACTIVE", | ||
default=False, | ||
required=False, | ||
help="Do not interactively prompt for username/password if the " | ||
"required credentials are missing." | ||
"required credentials are missing. (Can also be set via " | ||
"%(env)s environment variable.)" | ||
) | ||
parser.add_argument( | ||
"-c", "--comment", | ||
|
Hi there,
I doubt this was intentional: this change has caused the
--non-interactive
flag to accept an argument....got a bit confusing when one of my dist files wasn't uploaded ;)
I'm not certain how it'll affect the env var behaviour, but it's possible a simple
const=True
will do the trick?