astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.46k stars 459 forks source link

Support for environment variables substitution in scripts #1315

Open SamoylovMD opened 1 month ago

SamoylovMD commented 1 month ago

Currently Rye doesn't support environment variables in scripts:

[tool.rye.scripts]
test_env = "echo $HOME"

What I expect:

$ rye run test_env
/home/username

But what I got instead is:

$ rye run test_env
$HOME

I think this would be a good addition to the current capabilities of scripting.

my1e5 commented 1 month ago

Duplicate of https://github.com/astral-sh/rye/issues/695