使用代码设计时出错:errSecInternalComponent

Error using codesign: errSecInternalComponent

我正在尝试使用以下方法对 dmg 文件进行代码签名:

codesign --force --sign <identity> <path-to-disk-image>  

但它不起作用,我得到:

myDiskImAGE.dmg: errSecInternalComponent   

这是什么意思?

使用磁盘映像的完整路径为我解决了这个问题,希望这对其他人有帮助。