Skip to content

Azure CLI - Automation account replace-content is breaking on new line #29019

Description

@michalczerwinski

Describe the bug

This bug is still there:
https://www.oikita.com/en/azure/393208

It was reported in 2021 and combined with bicep inability to upload local file for runbook content is a real pain...

Related command

z automation runbook replace-content

Errors

On windows agents it uses only first line of the file

Issue script & Debug output

az automation runbook replace-content --automation-account-name "$environment-automation-account" --resource-group "$environment-din" --name "swap-main-server" --content "@$outputFile"

Expected behavior

Full content should be uploaded, not only first line

Environment Summary

azure-cli 2.49.0 *

core 2.49.0 *
telemetry 1.0.8 *

Extensions:
automation 0.2.2
azure-devops 0.26.0
azure-iot 0.21.2
resource-graph 2.1.0
storage-preview 0.9.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botAutomationService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions