From c42db2ec22315b9dc3e75ad3b752e4f57685e7dc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 26 Jun 2022 17:32:47 +0300 Subject: [PATCH] Rename `pio pkg publish --non-interactive` option to the `--no-interactive` --- docs | 2 +- platformio/package/commands/publish.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs b/docs index 148072a2..d24f9a64 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 148072a28e6b135049b1ee54911a8f58ce7393c9 +Subproject commit d24f9a649c849448e96fb7ee4aaa3aa6ffa7ba55 diff --git a/platformio/package/commands/publish.py b/platformio/package/commands/publish.py index c1c12a5a..6d2c73ed 100644 --- a/platformio/package/commands/publish.py +++ b/platformio/package/commands/publish.py @@ -71,14 +71,21 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument help="Notify by email when package is processed", ) @click.option( - "--non-interactive", + "--no-interactive", is_flag=True, help="Do not show interactive prompt", ) +@click.option( + "--non-interactive", + is_flag=True, + help="Do not show interactive prompt", + hidden=True, +) def package_publish_cmd( # pylint: disable=too-many-arguments, too-many-locals - package, owner, type_, released_at, private, notify, non_interactive + package, owner, type_, released_at, private, notify, no_interactive, non_interactive ): click.secho("Preparing a package...", fg="cyan") + no_interactive = no_interactive or non_interactive owner = owner or AccountClient().get_logged_username() do_not_pack = ( not os.path.isdir(package) @@ -118,7 +125,7 @@ def package_publish_cmd( # pylint: disable=too-many-arguments, too-many-locals # look for duplicates check_package_duplicates(owner, type_, name, version, manifest.get("system")) - if not non_interactive: + if not no_interactive: click.confirm( "Are you sure you want to publish the %s %s to the registry?\n" % (