Closed temhelk closed 10 months ago
I would guess that it's something about your environment. What operating system are you on, and which version of bash are you using? Also, can you share the output of echo "$-"
to see which shell options are active?
As a simplified test case, if you run something like
test "<(nonexistent)" = "x" || echo y
what does it do? I just get the output "y" without an error.
This happens when building from the AUR. I submitted a patch to the llpp AUR package that makes it build, and I'm providing the same fix here upstream with #10.
I updated my Arch Linux and now get the same problem. The update included a new version of bash, so maybe that's actually what changed.
In any case, I think we should fix this here instead of adding a patch to the AUR package.
Oh I didn't realise you were stek on the AUR 😅. It's much easier to fix it here in that case.
I'm excited to see I'm not the only one still using this program! That gives me hope we can keep it maintained without the original developer.
I propose we wait for a bit if anyone else has some thoughts on this, but if not I'll just merge your fix.
I did some additional tests and it turns out that indeed the behavior of bash changed. Something like
set -e
echo "$(<nonexistent)"
used to just generate an error message in bash 5.1 and leave the shell running, but in version 5.2 it closes the shell.
Anyway, thank you @temhelk and @txtsd for fixing it!
I'm trying to build llpp myself and I'm getting "build failed" error when I run
bash ./build.bash build
. I tried to debug that issue and that's what I found. I'm sorry if I got something wrong, not a bash person.The scripts exits after a call to this function defined like that:
https://github.com/criticic/llpp/blob/63def6568f1dca6a49f9f870164a5f726e6d59fe/build.bash#L198
If I understand correctly it makes the script exit because it tries to read the content of the file "$1.past" that doesn't exist when you build it the first time.
After changing the function to that:
It seems to work and build the application on the first run and skips everything on the second. Is that a problem with my environment or what is going on?