diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2022-06-19 22:02:35 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2022-06-19 22:02:35 +0300 |
commit | 87f2ab23e54896d648ab14c958a631ad8d2f138d (patch) | |
tree | 83b4d781f84ee3d6488bf0204fd90b230b4946a5 /bin/enter | |
parent | 1e016904fa37c4bc3673dbafa4b9f89fd3db3d1d (diff) | |
download | arching-kaos-tools-87f2ab23e54896d648ab14c958a631ad8d2f138d.tar.gz arching-kaos-tools-87f2ab23e54896d648ab14c958a631ad8d2f138d.tar.bz2 arching-kaos-tools-87f2ab23e54896d648ab14c958a631ad8d2f138d.zip |
Fixed bug that outputs invalid json when first block does not refer to GENESIS. We force an entry on the fly for it.
Diffstat (limited to 'bin/enter')
-rwxr-xr-x | bin/enter | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -60,8 +60,9 @@ then if [ -v $previous ] then - echo "Block $block has no previous zblock" - exit 3 + logthis "Block $block has no previous zblock $previous" + echo '"previous":"genesis"},{"genesis":"genesis"}]' + exit 0 else echo '"previous":"'$previous'"},' zblock=$previous @@ -170,8 +171,9 @@ do # code 3 if [ -v $previous ] then - echo "Block $block has no previous zblock" - exit 3 + logthis "Block $block has no previous zblock" + echo '"previous":"genesis"},{"genesis":"genesis"}]' + exit 0 # Otherwise, we inform of the sequence else |