4
我的目標之一是使用defaults命令讀取屬性列表的外部構建工具。Xcode Server bot無法使用默認命令讀取屬性列表
當一個機器人運行該工具,默認命令無法找到指定的默認:
defaults read /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/version CFBundleShortVersionString
> The domain/default pair of (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/version, CFBundleShortVersionString) does not exist
運行,從一個普通用戶的帳戶相同的命令工作正常:
defaults read /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/version CFBundleShortVersionString
> 7.1
但對於一些原因它不適用於_teamsserver用戶:
sudo -u _teamsserver defaults read /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/version CFBundleShortVersionString
> The domain/default pair of (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/version, CFBundleShortVersionString) does not exist
...這是爲什麼機器人無法建立。
任何想法,爲什麼這不起作用?
謝謝。