Skip to content
Discussion options

You must be logged in to vote

just's shell() function does not have special parsing of the $ character, so however a literal $ does or doesn't need to be escaped is up to the shell. What shell are you using for this justfile?

If you are using a bash-like shell, your original example...

gotenberg_version := "8.21.1"
gotenberg_image_tag := "gotenberg/gotenberg:" + gotenberg_version + "-cloudrun"
gotenberg_image_sha := shell("docker buildx imagetools inspect $1 | grep '^Digest:' | awk '{print $2}'", gotenberg_image_tag, '$2')

... looks like it should work without hacky ways to make the '{print $2}' have a literal $2 😕

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@piotrekkr
Comment options

Answer selected by piotrekkr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants