File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,15 @@ var launchdAgentDefinition []byte
31
31
32
32
// getLaunchdAgentPath will return the path of the launchd agent default path
33
33
func getLaunchdAgentPath () * paths.Path {
34
- return GetDefaultHomeDir ().Join ("Library" , "LaunchAgents" , "ArduinoCreateAgent.plist" )
34
+ 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
35
43
}
36
44
37
45
// InstallPlistFile will handle the process of creating the plist file required for the autostart
You can’t perform that action at this time.
0 commit comments