()
| 77 | } |
| 78 | |
| 79 | func installPath() (string, error) { |
| 80 | // User is root, use /Library/LaunchDaemons instead of home directory |
| 81 | if isRootUser() { |
| 82 | return fmt.Sprintf("/Library/LaunchDaemons/%s.plist", launchdIdentifier), nil |
| 83 | } |
| 84 | userHomeDir, err := userHomeDir() |
| 85 | if err != nil { |
| 86 | return "", err |
| 87 | } |
| 88 | return fmt.Sprintf("%s/Library/LaunchAgents/%s.plist", userHomeDir, launchdIdentifier), nil |
| 89 | } |
| 90 | |
| 91 | func stdoutPath() (string, error) { |
| 92 | if isRootUser() { |
no test coverage detected