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