Fix up vndr tooling

- Fix the error message in hack/validate/vendor to specify that
  hack/vendor.sh should be run instead of vndr.
- Fix hack/vendor.sh to also match on Windows paths for the whitelist.
  This allows the script to be run on Windows via Git Bash.

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
This commit is contained in:
Kevin Parsons 2021-07-13 09:45:07 -07:00
parent c81abefdb1
commit 3334fb9af1
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ validate_vendor_diff(){
echo
echo "$diffs"
echo
echo 'Please vendor your package with github.com/LK4D4/vndr.'
echo 'Please vendor your package with hack/vendor.sh.'
echo
if [ -n "$mfiles" ] ; then
git diff -- "$mfiles"

View file

@ -24,5 +24,5 @@ if [ $# -eq 0 ] || [ "$1" = "archive/tar" ]; then
fi
if [ $# -eq 0 ] || [ "$1" != "archive/tar" ]; then
vndr -whitelist=^archive/tar "$@"
vndr -whitelist='^archive[/\\]tar' "$@"
fi