You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that maybe the last PR generated an instances.json without any .i2p or .onion links. I'm assuming (big assumption) that the instances.json file was generated with the -T flag.
The logic in the bash script is set to fail when jq exits non-zero.
731 IFS=$'\n' imported_nonwww=($(jq -Mcer '.instances[] | select(.onion or .i2p)' "${import_nonwww_from_file}"))
732 rc=$?
733
734 if [[ ${rc} -ne 0 ]]
735 then
736 echo >&2 "Failed to read onion instances from existing JSON file."
737 return 1
738 fi
739 fi
In my opinion, it should be logical to sometimes have a list of redlib instances without .onion or .i2p sites.
A lazy way to do this would be to set rc to 0 when you do not find .onion or .i2p in the json (via grep for example). I've proposed this in a linked PR.
Other options
(schema fix) If you always expect an onion or i2p site to be running redlib then you'll have to check to see if people accidentally (or otherwise) generated the instances.json file without having Tor or I2p enabled. Maybe add a note to the json with the bash script flags or something.
(process fix) Personally, I don't think its reasonable for people adding their own (or others) instances to have to run Tor to generate the instances.json. You might be able to solve this by always having the maintainers generate instances.json (assuming maintainers use Tor and i2p).
The text was updated successfully, but these errors were encountered:
Since #51 was merged in Actions have been failing: https://github.com/redlib-org/redlib-instances/actions
It seems that maybe the last PR generated an
instances.json
without any.i2p
or.onion
links. I'm assuming (big assumption) that theinstances.json
file was generated with the-T
flag.The logic in the bash script is set to fail when jq exits non-zero.
In my opinion, it should be logical to sometimes have a list of redlib instances without
.onion
or.i2p
sites.A lazy way to do this would be to set
rc
to 0 when you do not find.onion
or.i2p
in the json (via grep for example). I've proposed this in a linked PR.Other options
(schema fix) If you always expect an onion or i2p site to be running redlib then you'll have to check to see if people accidentally (or otherwise) generated the
instances.json
file without having Tor or I2p enabled. Maybe add a note to the json with the bash script flags or something.(process fix) Personally, I don't think its reasonable for people adding their own (or others) instances to have to run Tor to generate the
instances.json
. You might be able to solve this by always having the maintainers generateinstances.json
(assuming maintainers use Tor and i2p).The text was updated successfully, but these errors were encountered: