Security command fails to add a keychain for codesigning
We use this flow to create a keychain add some certificates and use it for code-signing our application.
K_PATH = a path to a keychain either under ~/Library/Keychains, ~/Desktop
security create-keychain
security unlock-keychain
security -v list-keychains -s `security list-keychains | xargs` "$K_PATH"
# To verify the keychain search lists
security list-keychains -d user
security list-keychains
This works well on some machines, but on one particular macbook we notice that security command doesn't add the created keychain to its search lists.
Is there some reason why this could fail?