(appBundlePath: string)
| 230 | }; |
| 231 | |
| 232 | const readBundleIdentifier = (appBundlePath: string): string | null => { |
| 233 | try { |
| 234 | const plist = readFileSync(`${appBundlePath}/Contents/Info.plist`, "utf8"); |
| 235 | const match = plist.match(/<key>\s*CFBundleIdentifier\s*<\/key>\s*<string>([^<]*)<\/string>/); |
| 236 | const bundleIdentifier = match ? xmlUnescape(match[1].trim()) : ""; |
| 237 | return bundleIdentifier.length > 0 ? bundleIdentifier : null; |
| 238 | } catch { |
| 239 | return null; |
| 240 | } |
| 241 | }; |
| 242 | |
| 243 | const associatedBundleIdentifier = (programArguments: ReadonlyArray<string>): string | null => { |
| 244 | const executablePath = programArguments[0]; |
no test coverage detected