I am using appdmg
https://www.npmjs.com/package/appdmg to create dmg.
In OSX 10.15 it is failing quite often, I get the following error
Error: Command failed: hdiutil detach /Volumes/MyAppName
hdiutil: couldn't unmount "disk2" - Resource busy
What should I do to fix this?