<div dir="ltr">Hey stackers,<div><br></div><div>tools/config/generate_sample.sh isn't working on OS X due to the getopt usage. Any recipes / proposals to fix it? I have a workaround at least.</div><div><br></div><div>TL;DR</div>
<div><br></div><div>So, as I said tools/config/generate_sample.sh isn't working on OS X. Specifically it just couldn't parse command line arguments w/o any errors, just ignoring them. The reason of such behavior is significant difference between GNU getopt and BSD one (used in OS X). Probably, it could be easily fixed, but I don't know both of them.</div>
<div><br></div><div>The main issue is that many projects are using tools/config/check_uptodate.sh in pep8 tox env to ensure that their config sample is always uptodate. So, "tox -e pep8" command always failing for such projects.</div>
<div><br></div><div>Workaround: </div><div><br></div><div>* install GNU getopt by using homebrew (brew install gnu-getopt) or macports (port install getopts);</div><div>* add it to the PATH before the actual getopt before running tox;</div>
<div>* if you'd like to make it default just add it to your bashrc/zshrc/etcrc, for example, for brew you should add: export PATH=$(brew --prefix gnu-getopt)/bin:$PATH</div><div><br></div><div>Thanks.<br><div><div><br>
</div>-- <br><div dir="ltr"><div>Sincerely yours,</div><div>Sergey Lukjanov</div><div>Savanna Technical Lead</div><div>Mirantis Inc.</div></div>
</div></div></div>