Use lstat instead of stat

This commit is contained in:
Michael B. Gale
2026-10-19 12:28:54 +01:00
parent 7e5643a58e
commit fe45268b48
4 changed files with 97 additions and 37 deletions

10
lib/entry-points.js generated
View File

@@ -183445,7 +183445,15 @@ var XCODE_APP_FILENAME_PATTERN = new RegExp(
);
function xcodeVersion(logger2) {
try {
const stats = import_fs.default.statSync(XCODE_SELECT_LINK_PATH);
const stats = import_fs.default.lstatSync(XCODE_SELECT_LINK_PATH, {
throwIfNoEntry: false
});
if (stats === void 0) {
logger2.debug(
`'${XCODE_SELECT_LINK_PATH}' does not exist. Xcode is probably not installed.`
);
return void 0;
}
if (!stats.isSymbolicLink()) {
logger2.warning(
`${XCODE_SELECT_LINK_PATH} exists, but is not a symbolic link.`