node-ejs-renderer/node_modules/bundle-name/index.js

6 lines
362 B
JavaScript
Raw Normal View History

2024-06-09 13:55:01 -04:00
import {runAppleScript} from 'run-applescript';
export default async function bundleName(bundleId) {
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string\ntell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
}