Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 524

AzureDevops passing $`` instead of $() into jq arg via taskgroup

$
0
0

I currently have the following in my taskgroup bash script

jq --argjson timestamp "$`date +%s`" '.common |= . + {"TimeValue": $timestamp }' ${service}/${env}.json > tmpfile && mv tmpfile ${service}/${env}.json

my issue is with this part

"$`date +%s`"

when the task runs I get the following error

jq: invalid JSON text passed to --argjsonUse jq --help for help with command-line options,

So if I edit the existing release and change it to the following everything works:

"$(date +%s)"

The problem is when I change to the above in my taskgroup it now thinks that I am trying to add a new parameter which I do not want.

How can I solve this?


Viewing all articles
Browse latest Browse all 524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>