With recent Mac OS release we run into trouble with some scripts for the security command line.
Assume the following terminal command:
it give the following results:
The home path with the keychain path is enforced and the tile is not even expend. This was working before.
If I do a full path it work normally:
There is 2 thing wrong here, it doesn't detect the tile as absolute path nor does it expand it. Dunno who changed that but it's now broken. I will need to make a workaround into our Jenkins to repair this until Apple does. Apple command lines are just plain horribles, please hire some developer that understand command lines, this is such a pain to automate, having to automate GUI is plain ********.
Mac OS 10.15.7
Assume the following terminal command:
Code Block security default-keychain -s '~/Library/Keychains/login.keychain-db'
it give the following results:
Code Block Will not set default: file /Users/AmotusRemoteDev/Library/Keychains/~/Library/Keychains/login.keychain-db does not exist
The home path with the keychain path is enforced and the tile is not even expend. This was working before.
If I do a full path it work normally:
Code Block AmotusRemoteDev$ security default-keychain -s '/Users/AmotusRemoteDev/Library/Keychains/login.keychain-db'
There is 2 thing wrong here, it doesn't detect the tile as absolute path nor does it expand it. Dunno who changed that but it's now broken. I will need to make a workaround into our Jenkins to repair this until Apple does. Apple command lines are just plain horribles, please hire some developer that understand command lines, this is such a pain to automate, having to automate GUI is plain ********.
Mac OS 10.15.7
And that was a bug. Command-line tools should not expand ~; that’s the shell’s job.This was working before.
The reason why it’s not working in your situation is that you’ve put the ~ within single quotes. Consider this:
Code Block % echo ~ /Users/quinn % echo '~' ~
An easier option is to put the ~ outside the quotes:Here is the solution if anybody need it:
Code Block % echo ~'/Library/Keychains/login.keychain-db' /Users/quinn/Library/Keychains/login.keychain-db
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"