Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/azure-cli-core/azure/cli/core/commands/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,8 @@ def __call__(self, parser, namespace, value, option_string=None):
command.add_argument('_change_reference', '--change-reference', **change_reference_kwargs)
command.add_argument('_acquire_policy_token', '--acquire-policy-token', **acquire_policy_token_kwargs)

policy_token_feature_enabled = cli_ctx.config.getboolean('core', 'enable_policy_token', False)
if policy_token_feature_enabled:
from knack import events
cli_ctx.register_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, add_global_policy_argument)
from knack import events
cli_ctx.register_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, add_global_policy_argument)
Comment on lines +230 to +231
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description is currently the template and doesn’t document the impact of making --change-reference/--acquire-policy-token always available (potential CLI surface-area/breaking-change implications) or how it was tested. Please fill in the related command(s), rationale, and a concrete testing guide so reviewers can validate the behavior change.

Copilot uses AI. Check for mistakes.
Comment on lines +230 to +231
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the feature-flag means these global arguments are now registered for every command table load. There are no unit tests covering that the new global options are present where expected (and skipped for list/show). Consider adding a core test (e.g., in azure/cli/core/tests/test_parser.py or test_help.py) that builds a parser for a representative command and asserts the presence/absence of --change-reference and --acquire-policy-token.

Copilot uses AI. Check for mistakes.


# pylint: disable=too-many-statements
Expand Down
Loading