From cb46b9b93df4cde677a1a3667ef111c2e7f901ef Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Fri, 23 Apr 2021 19:44:12 +0300 Subject: [PATCH] Update index.js (#21) --- dist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index fb00624..131c499 100644 --- a/dist/index.js +++ b/dist/index.js @@ -171,7 +171,7 @@ exports.parsePlistFile = (plistPath) => { }; exports.getInstalledXcodeApps = () => { const applicationsDirectory = "/Applications"; - const xcodeAppFilenameRegex = /Xcode_([\d.]+)(_beta)?\.app/; + const xcodeAppFilenameRegex = /^Xcode.*\.app$/; const allApplicationsChildItems = fs.readdirSync(applicationsDirectory, { encoding: "utf8", withFileTypes: true }); const allApplicationsRealItems = allApplicationsChildItems.filter(child => !child.isSymbolicLink() && child.isDirectory()); const xcodeAppsItems = allApplicationsRealItems.filter(app => xcodeAppFilenameRegex.test(app.name));