Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for output redirect + os-independent environment variable substitution in cmd #2937

Open
schwaerz opened this issue Jun 12, 2024 · 1 comment
Labels
⭐ enhancement Improvements for existing features

Comments

@schwaerz
Copy link

We are trying to use pdm as a wrapper to Conan projects.

What we are doing is:

  • Install Conan and 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 cmd into a file
@schwaerz schwaerz added the ⭐ enhancement Improvements for existing features label Jun 12, 2024
@schwaerz
Copy link
Author

We found following workaround:

my_script.shell = "bash -c \"echo ${VAR}\""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

No branches or pull requests

1 participant