Skip to content

Instantly share code, notes, and snippets.

@reidmv
Last active December 21, 2015 11:49
Show Gist options
  • Save reidmv/6301680 to your computer and use it in GitHub Desktop.
Save reidmv/6301680 to your computer and use it in GitHub Desktop.
vagrant_suppress_expected_warnings()
{
if [ "$1" = "sandbox" ]; then
{ \vagrant "$@" 2>&1 >&3 | egrep -v \
-e 'Check your GSSAPI C librar' \
-e 'WARNING: Nokogiri was built against LibXML' \
>&2
} 3>&1 | { egrep -v \
-e 'Invalid machine state: PoweredOff' \
-e 'code VBOX_E_INVALID_VM_STATE (0x80bb0002),' \
-e 'PowerDown(progress.asOutParam())" at line 224'
}
else
{ \vagrant "$@" 2>&1 >&3 | egrep -v \
-e 'Check your GSSAPI C librar' \
-e 'WARNING: Nokogiri was built against LibXML' \
>&2
} 3>&1
fi
}
alias vagrant=vagrant_suppress_expected_warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment