Fix not being able to use the env format with stdin#42
Fix not being able to use the env format with stdin#42kolypto merged 1 commit intokolypto:masterfrom
Conversation
|
That's a really good one, @atomicptr ! Thank you so much :) |
|
Published to pip: |
|
@atomicptr unfortunately, I had to pull this release from pip because it has broken other people's builds: see #43 As it turned out, there was a good reason years ago not to include this sort of feature into Info: https://stackoverflow.com/a/699459/134904 Therefore, if you want to feed environment variables into stdin, you'll need to tell And this is something I've just taught
I hope it works for you :) |
The problem
You can't use the env format in combination with stdin
Example files
data.env
template.yml.j2
What I did
I added a unit test for the format env that uses stdin (which fails) and fixed the problem by checking if the stdin is connected to a shell like environment and if thats not the case (for instance when data is piped into the command) to use the regular code that would handle stdin.