azure-cli-extensions
azure-cli-extensions copied to clipboard
Can Description be Multi-Line?
I want a multi-line description... I was able to execute a powershell command using a multi-line Here-string - but only the first line of my text was used
az artifacts universal publish --organization "https://dev.azure.com/MyOrg/" --project="MyProject" --scope project --feed FeedName --name PackageName --version 40.1.3 `
--path "<pathToPublish>\publish" --description @'
- Bullet 1
- Bullet 2
- Bullet 3
'@
The Description line after upload just reads "- Bullet 1". What can I do to achieve this? Use a variable, or does it only take the first line??
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: fa27bc14-1989-60eb-06ea-1270d9fbf0f1
- Version Independent ID: 1f391f98-ac28-ba9f-366a-447c1f9e4feb
- Content: az artifacts universal
- Content Source: latest/docs-ref-autogen/ext/azure-devops/artifacts/universal.yml
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.
devops
I have the same problem. I use az cli in powershell to push universal packages:
az artifacts universal publish --organization <> --feed <> --name <> --version <> --path <> --description <>
And use the following ways to define multi line description, and none of them can succeed:
Command Line | Output (Json) |
---|---|
--description "a`nb" | { "Description": "a", ...} |
--description "a` b" |
{ "Description": "a", ...} |
--description "a`\nb" | { "Description": "a\\nb", ...} |
--description "a\nb" | { "Description": "a\\nb", ...} |
--description "a\\nb" | { "Description": "a\\\\nb", ...} |
I have the same problem. I use az cli in powershell to push universal packages:
az artifacts universal publish --organization <> --feed <> --name <> --version <> --path <> --description <>
And use the following ways to define multi line description, and none of them can succeed:
Command Line Output (Json) --description "a
nb" { "Description": "a", ...} --description "a
b" { "Description": "a", ...} --description "a`\nb" { "Description": "a\nb", ...} --description "a\nb" { "Description": "a\nb", ...} --description "a\nb" { "Description": "a\\nb", ...}
Same issue here with az devops project create --organization "https://dev.azure.com/myorg/" --name "myproject" --description "A multi-line description" --process "Agile" --source-control "Git" --visibility "private"
After trying the above, I also tried adding in 
as a break character and <br />
but that did not help either. Both show up in the UI as typed in the CLI.
Is there a way of adding multi-line descriptions? I think everything that we send via the CLI gets escaped, hence does not show as we would like it to show in the UI.
When trying az devops project show --org "https://dev.azure.com/myorg/" --project "myproject"
on a project which has multi-line description written in the UI, you will see an output similar to this:
{
...
"description": "This is a description with multiple lines. \n\n- Line 1.\n- Line 2",
...
}
Any feedback on this will be appreciated.