Skip to content

tool.pdm.scripts - shell variables #2706

Answered by jogielis
jogielis asked this question in Q&A
Discussion options

You must be logged in to vote

Ok found it, $ needs to be escaped.

Corrected block:

[tool.pdm.scripts]

a_command = { shell = """
/bin/bash <<EOF
a_var="A Var"
a_temp_dir=$(mktemp)
echo My temp dir: \\$a_temp_dir
echo My var: \\$a_var
EOF
""" }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jogielis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant