mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 12:05:21 +08:00
_scripts: handle not installed CommandLineTools (#2914)
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
This commit is contained in:
@ -271,7 +271,8 @@ func canMacnative() bool {
|
||||
|
||||
typesHeader := "/usr/include/sys/types.h"
|
||||
if major >= 11 || (major == 10 && minor >= 15) {
|
||||
typesHeader = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h"
|
||||
sdkpath := strings.TrimSpace(getoutput("xcrun", "--sdk", "macosx", "--show-sdk-path"))
|
||||
typesHeader = filepath.Join(sdkpath, "usr", "include", "sys", "types.h")
|
||||
}
|
||||
_, err = os.Stat(typesHeader)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user