diff --git a/go/utils/repofmt/check_fmt.sh b/go/utils/repofmt/check_fmt.sh index efc9dfb8ce..9dbdb5860a 100755 --- a/go/utils/repofmt/check_fmt.sh +++ b/go/utils/repofmt/check_fmt.sh @@ -7,7 +7,7 @@ cd $script_dir/../.. go install golang.org/x/tools/cmd/goimports -paths=`find . -depth 1 \( -name gen -prune -o -type d -print -o -type f -name '*.go' -print \)` +paths=`find . -maxdepth 1 -mindepth 1 \( -name gen -prune -o -type d -print -o -type f -name '*.go' -print \)` bad_files=$(goimports -l -local github.com/liquidata-inc/dolt $paths) if [ "$bad_files" != "" ]; then diff --git a/go/utils/repofmt/format_repo.sh b/go/utils/repofmt/format_repo.sh index 80f35cbc1f..22cf3954b3 100755 --- a/go/utils/repofmt/format_repo.sh +++ b/go/utils/repofmt/format_repo.sh @@ -5,7 +5,7 @@ set -eo pipefail script_dir=$(dirname "$0") cd $script_dir/../.. -paths=`find . -depth 1 \( -name gen -prune -o -type d -print -o -type f -name '*.go' -print \)` +paths=`find . -maxdepth 1 -mindepth 1 \( -name gen -prune -o -type d -print -o -type f -name '*.go' -print \)` goimports -w -local github.com/liquidata-inc/dolt $paths