azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

Can Description be Multi-Line?

Open cpyfferoen opened this issue 4 years ago • 4 comments

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.

cpyfferoen avatar Oct 30 '20 13:10 cpyfferoen

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.

ghost avatar Oct 30 '20 15:10 ghost

devops

yonzhan avatar Oct 30 '20 15:10 yonzhan

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", ...}

toothache avatar Dec 10 '20 13:12 toothache

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 "anb" { "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 &#013; 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.

VincentVerweij avatar Jun 08 '22 09:06 VincentVerweij