I have an array in bash that looks like:
libs=test1 test2
I would like to use the output of the bash script in a subsequent step in an ADO pipeline. How can I loop over this in ADO with pipeline variables like:
- ${{ each value in $(libs) }}:
- script: echo $value
- task: Npm@1
inputs:
command: 'custom'
customCommand: npm publish --ignore-scripts
workingDir: 'dist/libs/$(value)'
publishRegistry: 'useFeed'
publishFeed: 'feed'
libs=test1 test2is not an array;libs=test1assigns the stringtest1to the variablelibswhiletest2is treated as a command and, unless you have a command/alias/function namedtest2, should generate an error;libs=(test1 test2), orlibs=('test1' 'test2'), creates an array namedlibs