1

Dummy question may be but one thing that always confused me is the whether the space between {{}} should be there and also if the single quote should be there.

Are single quotes necessary?

'$(AzureConnectionName)'   VS $(AzureConnectionName)

Is the space required ?

'${{connectivity}}' VS  '${{ connectivity }}'

I know they are silly questions but could not find the answer.

Thanks

1
  • It would be far faster for you to try both and find out on your own than to ask a question here. Commented Apr 11, 2021 at 17:47

1 Answer 1

1

Are single quotes necessary?

If you use some special characters in your parameters, the output may be different. For example, here is my YAML configuration:

parameters:
- name: test
  default: test&
  type: string

steps:
- script: echo '${{ parameters.test }}' 
- script: echo ${{ parameters.test }}   
- pwsh: echo '${{ parameters.test }}'   
- pwsh: echo ${{ parameters.test }}     

Result:

enter image description here enter image description here

So when you are dealing with special characters in parameters, please pay attention to the single quotes.

Is the space required ?

No, the space is not required. '${{connectivity}}' and'${{ connectivity }}' are the same.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.