Skip to content

Commit

Permalink
Update index.js (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-lobanov authored Apr 23, 2021
1 parent e94e57a commit cb46b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit cb46b9b

Please sign in to comment.