pdm
pdm copied to clipboard
Support for output redirect + os-independent environment variable substitution in `cmd`
We are trying to use pdm as a wrapper to Conan projects.
What we are doing is:
- Install
Conanand other tools using python packages - Define aliases for most commonly used commands (as an alternative to dedicated scripts)
- Some of the commands need both environment variable subsitution as well as redirecting the output into a file
Currently I have the choice between cmd and shell. AFAIK only with shell I can redirect the output. However I cannot use shell as I'd have a different command line wrt to using environment variables %VAR% vs ${VAR}, depending on the OS.
Describe the solution you'd like
- Possbility to redirect the output as part of
cmdinto a file
We found following workaround:
my_script.shell = "bash -c \"echo ${VAR}\""