Skip to content

Commit e871913

Browse files
committed
dev: command-line tools are sufficient
Things have changed and the command-line tools are sufficient for building with Bazel these days. Update the `doctor` check accordingly. Epic: CRDB-17171 Release note: None
1 parent c78ecb9 commit e871913

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fi
88
set -euo pipefail
99

1010
# Bump this counter to force rebuilding `dev` on all machines.
11-
DEV_VERSION=109
11+
DEV_VERSION=110
1212

1313
THIS_DIR=$(cd "$(dirname "$0")" && pwd)
1414
BINARY_DIR=$THIS_DIR/bin/dev-versions

pkg/cmd/dev/doctor.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const (
3030
// doctorStatusVersion is the current "version" of the status checks
3131
// performed by `dev doctor``. Increasing it will force doctor to be re-run
3232
// before other dev commands can be run.
33-
doctorStatusVersion = 10
33+
doctorStatusVersion = 11
3434

3535
noCacheFlag = "no-cache"
3636
interactiveFlag = "interactive"
@@ -143,17 +143,13 @@ var allDoctorChecks = []doctorCheck{
143143
if runtime.GOOS != "darwin" {
144144
return ""
145145
}
146-
stdout, err := d.exec.CommandContextSilent(ctx, "/usr/bin/xcodebuild", "-version")
146+
stdout, err := d.exec.CommandContextSilent(ctx, "/usr/bin/xcode-select", "-p")
147147
if err != nil {
148-
log.Println("Failed to run `/usr/bin/xcodebuild -version`.")
148+
log.Println("Failed to run `/usr/bin/xcode-select -p`.")
149149
stdoutStr := strings.TrimSpace(string(stdout))
150150
printStdoutAndErr(stdoutStr, err)
151-
return `You must have a full installation of XCode to build with Bazel.
152-
A command-line tools instance does not suffice.
153-
Please perform the following steps:
154-
1. Install XCode from the App Store.
155-
2. Launch Xcode.app at least once to perform one-time initialization of developer tools.
156-
3. Run ` + "`xcode-select -switch /Applications/Xcode.app/`."
151+
return `You must have the XCode command-line tools installed (if not a full installation of XCode) to build with Bazel.
152+
Please run ` + "`xcode-select --install`."
157153
}
158154
return ""
159155
},

0 commit comments

Comments
 (0)