Open sithembiso opened 2 years ago
I had the error reported by a user of our service this morning.
Error: open /Users/<username>/Library/LaunchAgents/service.plist: no such file or directory
It looks like on macOS Monterey, the ~/Library/LaunchAgents directory does not exist. I can also see that we don't attempt to create it during installation here: https://github.com/takama/daemon/blob/496d69192531c6cb1004380a0be0fcf2031b06f4/daemon_darwin.go#L94 I think we should always ensure that the directory exists before os.Create(). Am I mistaken? If not, I don't mind sending a PR.
~/Library/LaunchAgents
os.Create()
I had the error reported by a user of our service this morning.
It looks like on macOS Monterey, the
~/Library/LaunchAgents
directory does not exist. I can also see that we don't attempt to create it during installation here: https://github.com/takama/daemon/blob/496d69192531c6cb1004380a0be0fcf2031b06f4/daemon_darwin.go#L94 I think we should always ensure that the directory exists beforeos.Create()
. Am I mistaken? If not, I don't mind sending a PR.