(programArguments: ReadonlyArray<string>)
| 237 | }; |
| 238 | |
| 239 | const associatedBundleIdentifier = (programArguments: ReadonlyArray<string>): string | null => { |
| 240 | const executablePath = programArguments[0]; |
| 241 | if (!executablePath) return null; |
| 242 | const appBundlePath = enclosingAppBundlePath(executablePath); |
| 243 | if (!appBundlePath) return null; |
| 244 | const bundleIdentifier = readBundleIdentifier(appBundlePath); |
| 245 | if (bundleIdentifier) return bundleIdentifier; |
| 246 | return /(?:^|\/)Executor\.app\/Contents\//.test(executablePath) |
| 247 | ? DESKTOP_APP_BUNDLE_IDENTIFIER |
| 248 | : null; |
| 249 | }; |
| 250 | |
| 251 | export interface LaunchdPlistOptions { |
| 252 | readonly label: string; |
no test coverage detected