We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
LaunchAgents/
1 parent 604da4a commit 6c5dfaeCopy full SHA for 6c5dfae
config/autostart.go
@@ -31,7 +31,15 @@ var launchdAgentDefinition []byte
31
32
// getLaunchdAgentPath will return the path of the launchd agent default path
33
func getLaunchdAgentPath() *paths.Path {
34
- return GetDefaultHomeDir().Join("Library", "LaunchAgents", "ArduinoCreateAgent.plist")
+ homeDir := GetDefaultHomeDir()
35
+ launchAgentsPath := homeDir.Join("Library", "LaunchAgents")
36
+ agentPlistPath := launchAgentsPath.Join("ArduinoCreateAgent.plist")
37
+
38
+ if err := os.MkdirAll(launchAgentsPath.String(), 0755); err != nil {
39
+ log.Panicf("Could not create ~/Library/LaunchAgents directory: %s", err)
40
+ }
41
42
+ return agentPlistPath
43
}
44
45
// InstallPlistFile will handle the process of creating the plist file required for the autostart
0 commit comments