-
[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
""" } $ pdm run -v a_command
Running <task a_command>: /bin/bash <<EOF
a_var="A Var"
a_temp_dir=$(mktemp)
echo My temp dir: $a_temp_dir
echo My var: $a_var
EOF
My temp dir:
My var: Can't seem to figure out why the variables are empty? |
Beta Was this translation helpful? Give feedback.
Answered by
jogielis
Mar 20, 2024
Replies: 1 comment
-
Ok found it, 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
""" } |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jogielis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok found it,
$
needs to be escaped.Corrected block: