From 8f933c23ab0a07d4ca946268ec5248ca55cdd379 Mon Sep 17 00:00:00 2001 From: Rohan Patnaik Date: Fri, 22 May 2026 12:28:58 +0530 Subject: [PATCH 1/2] fix(role): escape datetime help percent signs --- src/azure-cli/azure/cli/command_modules/role/_params.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/role/_params.py b/src/azure-cli/azure/cli/command_modules/role/_params.py index d015fd6f42b..3c7788367a9 100644 --- a/src/azure-cli/azure/cli/command_modules/role/_params.py +++ b/src/azure-cli/azure/cli/command_modules/role/_params.py @@ -185,7 +185,7 @@ def load_arguments(self, _): with self.argument_context('ad sp create-for-rbac') as c: c.argument('display_name', options_list=['--display-name', '--name', '-n'], - help='Display name of the service principal. If not present, default to azure-cli-%Y-%m-%d-%H-%M-%S ' + help='Display name of the service principal. If not present, default to azure-cli-%%Y-%%m-%%d-%%H-%%M-%%S ' 'where the suffix is the time of creation.') c.argument('create_password', arg_type=get_three_state_flag(), arg_group='Credential', help='Create a password credential (secret) on the the application. This is the default behavior. ' @@ -359,7 +359,7 @@ def load_arguments(self, _): c.argument('include_groups', action='store_true', help='Include extra assignments to the groups of which the user is a member (transitively).') - time_help = 'The {} of the query in the format of %Y-%m-%dT%H:%M:%SZ, e.g. 2000-12-31T12:59:59Z. Defaults to {}' + time_help = 'The {} of the query in the format of %%Y-%%m-%%dT%%H:%%M:%%SZ, e.g. 2000-12-31T12:59:59Z. Defaults to {}' with self.argument_context('role assignment list-changelogs') as c: c.argument('start_time', help=time_help.format('start time', '1 Hour prior to the current time')) c.argument('end_time', help=time_help.format('end time', 'the current time')) From ebf2c9064b33de81028f0ca93084da4197f76aac Mon Sep 17 00:00:00 2001 From: Rohan Patnaik Date: Fri, 22 May 2026 14:29:37 +0530 Subject: [PATCH 2/2] fix(role): polish role help text --- src/azure-cli/azure/cli/command_modules/role/_params.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/role/_params.py b/src/azure-cli/azure/cli/command_modules/role/_params.py index 3c7788367a9..8d8d129f2d3 100644 --- a/src/azure-cli/azure/cli/command_modules/role/_params.py +++ b/src/azure-cli/azure/cli/command_modules/role/_params.py @@ -185,7 +185,7 @@ def load_arguments(self, _): with self.argument_context('ad sp create-for-rbac') as c: c.argument('display_name', options_list=['--display-name', '--name', '-n'], - help='Display name of the service principal. If not present, default to azure-cli-%%Y-%%m-%%d-%%H-%%M-%%S ' + help='Display name of the service principal. If not present, defaults to azure-cli-%%Y-%%m-%%d-%%H-%%M-%%S ' 'where the suffix is the time of creation.') c.argument('create_password', arg_type=get_three_state_flag(), arg_group='Credential', help='Create a password credential (secret) on the the application. This is the default behavior. ' @@ -359,7 +359,7 @@ def load_arguments(self, _): c.argument('include_groups', action='store_true', help='Include extra assignments to the groups of which the user is a member (transitively).') - time_help = 'The {} of the query in the format of %%Y-%%m-%%dT%%H:%%M:%%SZ, e.g. 2000-12-31T12:59:59Z. Defaults to {}' + time_help = 'The {} for the query in the format of %%Y-%%m-%%dT%%H:%%M:%%SZ, e.g. 2000-12-31T12:59:59Z. Defaults to {}' with self.argument_context('role assignment list-changelogs') as c: c.argument('start_time', help=time_help.format('start time', '1 Hour prior to the current time')) c.argument('end_time', help=time_help.format('end time', 'the current time'))