Reputation: 101
How can I escape & in a script argument or variable in devops pipeline?
Upvotes: 0
Views: 546
Reputation: 1162
What do you mean 'escape &'? In the azure devops pipeline variable, we do not need to escape &, we can just use it in the variables and output it:
variables:
- name: Test_For_ABC
value: ABC'\&'fasd
stages:
- stage: A
variables:
- group: cmt
jobs:
- job: A1
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
Write-Host "$(dockerhubuser)"
Write-Host "$(Test_For_ABC)"
Upvotes: 1