Reputation: 3374
I have a task in an agent job on Azure DevOps that runs an inline bash script. Part of what it does is to read the content of a file and assign it to a variable:
filecontent=$(<artifact/drop/myfile.txt)
I want to make this task part of a task group, however when I create a task group from the task it is identifying $(<artifact/drop/myfile.txt)
as a variable and automatically adding it to the list of variables for the task group.
Is there a way round this?
Upvotes: 0
Views: 1535
Reputation: 3374
Set the variable as follows:
filecontent=`cat artifact/drop/myfile.txt`
Upvotes: 2