kadwanev / retry

The command line retry tool
254 stars 28 forks source link

I’m sorry, 'getopt --test' failed in this environment. Please load GNU getopt. #10

Closed liamawhite closed 6 years ago

liamawhite commented 6 years ago

Fresh install from homebrew as described in the readme

Liams-MBP:istio liam$ retry -s 10 -t 10 'echo "this is a test"; false'
I’m sorry, 'getopt --test' failed in this environment. Please load GNU getopt.
stevenmusumeche commented 6 years ago

same here

kadwanev commented 6 years ago

I need to figure out how to deal with this properly. (Help?)

But you can pick your immediate fix out of here:

1) Install coreutils (brew install coreutils) 2a) Redirect GNU getopt at your shell:

getopt() { /usr/local/opt/gnu-getopt/bin/getopt "$@"; }
export -f getopt

2b) Modify line https://github.com/kadwanev/retry/blob/master/retry#L96 to use /usr/local/opt/gnu-getopt/bin/getopt specifically.

I guess I should figure this out in the brew install somehow.

kadwanev commented 6 years ago

I think I got this licked. Could you try with pull number 27283 and see if all's well? Thanks

Knappek commented 5 years ago

I'm still getting this error. The fix you mentioned didn't help unfortunately...and brew pull 27283 times out.