mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.03k stars 829 forks source link

[MM-60080] Fixed the MAS migration from the DMG build, fixed a potential crash case #3186

Closed devinbinnie closed 2 weeks ago

devinbinnie commented 3 weeks ago

Summary

At some point, the MAS migration broke due to what I assume is a change in behaviour of fs.cpSync. To copy directories now, you need to include recursive: true as an option. This is likely something that changed in macOS, as Node doesn't seem to make any mention of this.

While investigating and fixing the issue, I ran into a case where the app can crash due to certain singletons that might try to register a duplicate handler.

This PR fixes both of the above issues.

Ticket Link

https://mattermost.atlassian.net/browse/MM-60080

Fixed an issue where the MAS migration from DMG would always fail, fixed a potential crash case