-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
environment variables in pipfile scripts are not recognized correctly #3901
Comments
fyi: npm scripts in |
a workaround is to use |
What about multiple environment arguments? |
Hello everyone, I made a first hackish version that fixes the error of the issue. Something that is missing, is defining which use cases this feature should cover.
I think that the purpose of this feature was to give an easy tool for a developer to run local script to do tests. |
I want to use something like below:
Whereas Now, it is not able to resolve the env variable passed in Any solution for this? |
Okay I got a solution, I needed to use
|
@Madoshakalaka Could you check if new version |
Its |
Why It got closed? |
@piranna because of recent improvements to pipenv and a lack of response on this issue. Should it not be considered closed? |
If it's still not possible to define an environment variable in the |
@piranna There is a new version of pipenv, can you try it and report back? There are so many things going on that I cannot personally triage everything. All I know is that you can define whatever variables you want in a |
No, You have tested by defining one env variable and accessing it. It worked for me as well. [scripts]
docker_build="docker build -t $HELLO ." this did not work before, but with the version above |
sorry for late response.. I just tested with updated version of pipenv and it works. The pipenv version currently I am using is .env NOTEBOOK_DIR=path-to-your-notebook-dir pipfile [scripts]
notebook="jupyter notebook --notebook-dir=$NOTEBOOK_DIR" terminal pipenv run notebook 🥇 |
Wait I just re-opened this and then re-read the comments. Are you saying @jyotirmay123 it does in fact work |
@matteius yes, it does work now with the updated version. Thank you very much for the hard work. Cheers. |
I think this should be re-opened, because the same syntax that would work in npm's
doesn't work with Pipfile, even in version 2023.12.1. It says:
|
When running scripts from pipfile. Unix style environment variables are wrongly recognized as commands.
Expected result
hello=world
is recognized as setting an environment variableActual result
Error: the command hello=world (from generic-script) could not be found within PATH.
Steps to replicate
pipfile
$ pipenv run generic-script
The text was updated successfully, but these errors were encountered: