Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash_completion emits error about nosort option after installing wireguard-tools #32535

Closed
hborders opened this issue Sep 28, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@hborders
Copy link

commented Sep 28, 2018

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?
brew config output
HOMEBREW_VERSION: 1.7.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: f239b7a62790cfb4f33bda9aab7597d43f1b1e3b
Last commit: 7 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 84c20c2a4e013dab31ed3f96ca7160e7c0836506
Core tap last commit: 25 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GIT: git
HOMEBREW_MACOS_VERSION_NUMERIC: 101206
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 9.0 build 900
Git: 2.19.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.12.6-x86_64
CLT: 9.2.0.0.1.1510905681
Xcode: 9.2 => /Applications/Xcode-9.2.app/Contents/Developer
XQuartz: N/A
brew doctor output
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libfreebl3.dylib
  /usr/local/lib/libnspr4.dylib
  /usr/local/lib/libnss3.dylib
  /usr/local/lib/libnssckbi.dylib
  /usr/local/lib/libnssdbm3.dylib
  /usr/local/lib/libnssutil3.dylib
  /usr/local/lib/libplc4.dylib
  /usr/local/lib/libplds4.dylib
  /usr/local/lib/libsmime3.dylib
  /usr/local/lib/libsoftokn3.dylib
  /usr/local/lib/libssl3.dylib

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libcertdb.a
  /usr/local/lib/libcerthi.a
  /usr/local/lib/libcrmf.a
  /usr/local/lib/libcryptohi.a
  /usr/local/lib/libdbm.a
  /usr/local/lib/libfreebl.a
  /usr/local/lib/libjar.a
  /usr/local/lib/libnspr4.a
  /usr/local/lib/libnss.a
  /usr/local/lib/libnssb.a
  /usr/local/lib/libnssckfw.a
  /usr/local/lib/libnssdbm.a
  /usr/local/lib/libnssdev.a
  /usr/local/lib/libnsspki.a
  /usr/local/lib/libnssutil.a
  /usr/local/lib/libpk11wrap.a
  /usr/local/lib/libpkcs12.a
  /usr/local/lib/libpkcs7.a
  /usr/local/lib/libpkixcertsel.a
  /usr/local/lib/libpkixchecker.a
  /usr/local/lib/libpkixcrlsel.a
  /usr/local/lib/libpkixmodule.a
  /usr/local/lib/libpkixparams.a
  /usr/local/lib/libpkixpki.a
  /usr/local/lib/libpkixresults.a
  /usr/local/lib/libpkixstore.a
  /usr/local/lib/libpkixsystem.a
  /usr/local/lib/libpkixtop.a
  /usr/local/lib/libpkixutil.a
  /usr/local/lib/libplc4.a
  /usr/local/lib/libplds4.a
  /usr/local/lib/libsectool.a
  /usr/local/lib/libsmime.a
  /usr/local/lib/libsoftokn.a
  /usr/local/lib/libssl.a

To help us debug your issue please explain:

  • Install wireguard-tools because I have to use wg to connect to an internal network

  • What happened (include command output)
    When I start a new terminal, I see the following output:

-bash: complete: nosort: invalid option name
-bash: complete: nosort: invalid option name

I'm using brew's bash_completion, which I've installed into my .bashrc thusly (and I source my .bashrc in my .bash_profile):

# this is for git bash completion. I don't know if it's redundant to install it this way
# but I've always had it as a separate sourcing. It isn't the cause of the problem,
# but I wanted to include it just in case it mattered somehow
if [ -f $(brew --repository)/Library/Contributions/brew_bash_completion.sh ]; then
  . $(brew --repository)/Library/Contributions/brew_bash_completion.sh
fi

# I commented this out, and the `-bash: complete: nosort: invalid option name` disappeared
# Then, I enabled debugging with `set -x` (still enabled below), and pinpointed the causes
# of the error:
# ++++ complete -o nosort -F _wg_completion wg
# -bash: complete: nosort: invalid option name
# ++++ complete -o filenames -o nosort -F _wg_quick_completion wg-quick
# -bash: complete: nosort: invalid option name
if [ -f $(brew --prefix)/etc/bash_completion ]; then
  set -x
  . $(brew --prefix)/etc/bash_completion
  set +x
fi
  • What you expected to happen
    I shouldn't see any errors when I start a new terminal

  • Step-by-step reproduction instructions (by running brew install commands)
    On a Mac running macOS 10.12 Sierra, run the following:

brew install wireguard-tools

And then add brew bash completion to your .bashrc and .bash_profile:

if [ -f $(brew --prefix)/etc/bash_completion ]; then
  . $(brew --prefix)/etc/bash_completion
fi

Open a new terminal, and observe the following two errors on startup:

-bash: complete: nosort: invalid option name
-bash: complete: nosort: invalid option name
@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Sep 30, 2018

I don't see any reference to nosort in https://github.com/Homebrew/brew/blob/master/completions/bash/brew. What's your which bash output and bash --version output?

@hborders

This comment has been minimized.

Copy link
Author

commented Oct 1, 2018

It's coming from whatever wireguard-tools adds. Maybe this is a wireguard-tools issue instead? I filed an issue on their mailing list, but it hasn't been approved yet.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

commented Oct 1, 2018

Maybe this is a wireguard-tools issue instead?

Yes, sounds like it. Thanks!

@MikeMcQuaid MikeMcQuaid closed this Oct 1, 2018

@hborders

This comment has been minimized.

Copy link
Author

commented Oct 2, 2018

wireguard-tools has proposed a fix

@lock lock bot added the outdated label Nov 1, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Nov 1, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.