When running scripts from pipfile. Unix style environment variables are wrongly recognized as commands.
hello=world
is recognized as setting an environment variable
Error: the command hello=world (from generic-script) could not be found within PATH.
pipfile
[scripts]
generic-script = 'hello=world python --version'
$ pipenv run generic-script
fyi: npm scripts in package.json
handles this correctly
a workaround is to use $ env hello=world <commands>
on unix systems.
What about multiple environment arguments?
Hello everyone,
I am trying to contribute to the project trying to solve this issue.
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.
Some examples:
${MYVAR} or $MY_VAR
echo "hello"; python --version
|
or &&
or ||
operators?I think that the purpose of this feature was to give an easy tool for a developer to run local script to do tests.
Most helpful comment
What about multiple environment arguments?