One of my targets is an external build tool that uses the defaults command to read a property list.
When a bot runs that tool, the defaults command fails to find the specified default:
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
Running that same command from a regular user's account works fine:
defaults read /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/version CFBundleShortVersionString
> 7.1
But for some reason it doesn't work for the _teamsserver user:
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
…which is why the bot can't build.
Any idea why this doesn't work?
Thanks.