Scripts should allow multiple shell commands to be run as one "script". Both Yarn and npm allow this. Currently, if you try to do this:
[scripts]
foo = "echo 'bar' && echo 'baz'"
it will result in bar && echo baz
. You can sidestep this issue by doing something like
[scripts]
foo = "bash -c \"echo 'bar' && echo 'baz'\""
but
The use case that I have is running coverage report
after running coverage, but it's definitely something that would have many general uses.
Running pipenv run foo
should result in:
baz
Running pipenv run foo
results in:
bar && echo baz
Create a Pipfile with the following:
[scripts]
foo = "bash -c \"echo 'bar' && echo 'baz'\""
This has been discussed before. The bottom line is this is to difficult to get right, especially since Pipenv needs to support a cross-platform experience. Use a task runner for this, or shell scripts.
Sorry, should鈥檝e mentioned I鈥檓 not closing because we don鈥檛 want to accept this, but because this is a duplicate.
Finally found what this duplicates - https://github.com/pypa/pipenv/issues/2038
@stevenhair as a FYI the duplicate tag isn't really a criticism or a dismissal it's more for internal note and as a note to other maintainers that we have already hashed this out. Nothing personal, the request is legitimate -- it just carries a lot of complexity that we can't afford to support. Thanks for filing the issue and digging up the reference!
Oh, I know - I didn't mean sound annoyed or brash in my response, it was just a note for future travellers.
Most helpful comment
Oh, I know - I didn't mean sound annoyed or brash in my response, it was just a note for future travellers.