|
if stdinStat.Mode() & os.ModeNamedPipe != 0 {*iFilePtr = "-"} |
Hello everyone!
Maybe someone will find this information helpful.
I have spent 2.5 days dealing with an issue that did not let me to use this app in Github Actions workflow showing an error (code: 2) and app's help information all the time, before I found the solution. To be clear, I should mention that in my local environments (clear Ubuntu:24.04 container, my own image based on Ubuntu:24.04 and even nektos/act tool) everything worked perfectly.
The problem is that Github Actions workflow executes an environment in such a way somehow that this app thinks there is an input passed already as a pipe or something, so it shows an error. For the app it looks like "-i" flag is passed twice.
Here is my solution:
./hosts-bl -f "hosts" -i "${FILE_NAME}" -compression "9" -hash "256" -from_blackhole "0.0.0.0" -to_blackhole "0.0.0.0" -o "${FILE_NAME_MIN}" < /dev/null
The most important part of this is:
< /dev/null
I do not say that it is the best implementation, but it works now, at least. :)
Hosts-BL/hosts-bl.go
Line 412 in 6bc0cef
Hello everyone!
Maybe someone will find this information helpful.
I have spent 2.5 days dealing with an issue that did not let me to use this app in Github Actions workflow showing an error (code: 2) and app's help information all the time, before I found the solution. To be clear, I should mention that in my local environments (clear Ubuntu:24.04 container, my own image based on Ubuntu:24.04 and even nektos/act tool) everything worked perfectly.
The problem is that Github Actions workflow executes an environment in such a way somehow that this app thinks there is an input passed already as a pipe or something, so it shows an error. For the app it looks like "-i" flag is passed twice.
Here is my solution:
./hosts-bl -f "hosts" -i "${FILE_NAME}" -compression "9" -hash "256" -from_blackhole "0.0.0.0" -to_blackhole "0.0.0.0" -o "${FILE_NAME_MIN}" < /dev/nullThe most important part of this is:
< /dev/nullI do not say that it is the best implementation, but it works now, at least. :)