Skip to content

Commit

Permalink
[ACR] acr task run: Add missing --no-format option (#21983)
Browse files Browse the repository at this point in the history
  • Loading branch information
northtyphoon committed Apr 12, 2022
1 parent bd8e53b commit 89e1573
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/azure-cli/azure/cli/command_modules/acr/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,7 @@ def acr_task_run(cmd, # pylint: disable=too-many-locals
secret_arg=None,
target=None,
update_trigger_token=None,
no_format=False,
no_logs=False,
no_wait=False,
resource_group_name=None,
Expand Down Expand Up @@ -915,7 +916,7 @@ def acr_task_run(cmd, # pylint: disable=too-many-locals
from ._run_polling import get_run_with_polling
return get_run_with_polling(cmd, client, run_id, registry_name, resource_group_name)

return stream_logs(cmd, client, run_id, registry_name, resource_group_name, timeout, True)
return stream_logs(cmd, client, run_id, registry_name, resource_group_name, timeout, no_format, True)


def acr_task_show_run(cmd,
Expand Down Expand Up @@ -984,6 +985,7 @@ def acr_task_logs(cmd,
run_id=None,
task_name=None,
image=None,
no_format=False,
resource_group_name=None):
_, resource_group_name = validate_managed_registry(
cmd, registry_name, resource_group_name, TASK_NOT_SUPPORTED)
Expand All @@ -1007,7 +1009,7 @@ def acr_task_logs(cmd,
task_name=task_name,
image=image))

return stream_logs(cmd, client, run_id, registry_name, resource_group_name)
return stream_logs(cmd, client, run_id, registry_name, resource_group_name, None, no_format, False)


def _get_list_runs_message(base_message, task_name=None, image=None):
Expand Down
3 changes: 2 additions & 1 deletion src/azure-cli/azure/cli/command_modules/acr/taskrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def acr_taskrun_logs(cmd,
client, # cf_acr_runs
registry_name,
taskrun_name,
no_format=False,
resource_group_name=None):
_, resource_group_name = validate_managed_registry(
cmd, registry_name, resource_group_name, TASKRUN_NOT_SUPPORTED)
Expand All @@ -57,4 +58,4 @@ def acr_taskrun_logs(cmd,
response = client_taskruns.get(resource_group_name, registry_name, taskrun_name)
run_id = response.run_result.run_id

return stream_logs(cmd, client, run_id, registry_name, resource_group_name)
return stream_logs(cmd, client, run_id, registry_name, resource_group_name, None, no_format, False)

0 comments on commit 89e1573

Please sign in to comment.