microsoft / spoor

Compiler-instrumented app tracing.
https://www.spoor.dev
Other
52 stars 6 forks source link

Set DEVELOPER_PATH to active developer directory #270

Closed lelandjansen closed 2 years ago

lelandjansen commented 2 years ago

Xcode does not set the DEVELOPER_DIR environment variable when invoking its toolchain commands. Therefore, the previous logic always fell back to the default path of /Applications/Xcode.app/Contents/Developer which does not work for customized Xcode installations. This PR sets the DEVELOPER_PATH to the active developer directory retrieved from xcode-select --print-path. The value can still be overridden by setting DEVELOPER_DIR.