Closed michael-o closed 2 years ago
I just added code to return a value of 2 if a repair occurs. How does it work for you now?
I just added code to return a value of 2 if a repair occurs. How does it work for you now?
Yes, this works for me, but should also be reflected in the manpage:
+ [ -z ports ]
+ /usr/local/sbin/gitup -v 0 ports
# The local repository has been repaired. Please rerun gitup to pull the latest commit.
+ rc=2
+ [ 2 -eq 2 ]
+ /usr/local/sbin/gitup -v 0 ports
+ rc=0
+ [ 0 -ne 0 ]
+ exit 0
Gah! Sorry about that!
Looks good to me.
I'd like to automate gitup, but this is a problem:
https://github.com/johnmehr/gitup/blob/aad38a82b254e461bd6337ce72bfe7f2bf6b4d13/gitup.c#L4131-L4134
Basically, the return code is still zero althrough I need to rerun gitup. From a script (
periodic(8)
) I cannot detect that w/o grepping through the output which I don't want to.My request is to either return another, well defined, exit code or make it configurable to return non-zero for that.