mirror of
https://github.com/github/codeql-action.git
synced 2026-11-05 04:29:40 +00:00
Change log level of messages in xcodeVersion
This commit is contained in:
20
lib/entry-points.js
generated
20
lib/entry-points.js
generated
@@ -183454,27 +183454,25 @@ function xcodeVersion(logger2) {
|
||||
throwIfNoEntry: false
|
||||
});
|
||||
if (stats === void 0) {
|
||||
logger2.debug(
|
||||
`'${XCODE_SELECT_LINK_PATH}' does not exist. Xcode is probably not installed.`
|
||||
);
|
||||
logger2.debug(`'${XCODE_SELECT_LINK_PATH}' does not exist.`);
|
||||
return void 0;
|
||||
}
|
||||
if (!stats.isSymbolicLink()) {
|
||||
logger2.warning(
|
||||
logger2.debug(
|
||||
`${XCODE_SELECT_LINK_PATH} exists, but is not a symbolic link.`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
const xcodePath = import_fs.default.readlinkSync(XCODE_SELECT_LINK_PATH);
|
||||
if (xcodePath === "") {
|
||||
logger2.warning(
|
||||
logger2.debug(
|
||||
`Resolving ${XCODE_SELECT_LINK_PATH} unexpectedly returned nothing.`
|
||||
);
|
||||
return void 0;
|
||||
}
|
||||
const matchResult = xcodePath.match(XCODE_APP_FILENAME_PATTERN);
|
||||
if (matchResult?.groups === void 0) {
|
||||
logger2.warning(
|
||||
logger2.debug(
|
||||
`Xcode path '${xcodePath}' does not contain expected pattern.`
|
||||
);
|
||||
return void 0;
|
||||
@@ -183482,14 +183480,12 @@ function xcodeVersion(logger2) {
|
||||
const majorMinor = matchResult.groups["majorMinor"];
|
||||
const version = semver6.coerce(majorMinor);
|
||||
if (version === null) {
|
||||
logger2.warning(`Couldn't parse '${majorMinor}' as a semantic version.`);
|
||||
logger2.debug(`Couldn't parse '${majorMinor}' as a semantic version.`);
|
||||
return void 0;
|
||||
}
|
||||
return version;
|
||||
} catch (err) {
|
||||
logger2.warning(
|
||||
`Unable to determine Xcode version: ${getErrorMessage(err)}`
|
||||
);
|
||||
logger2.debug(`Unable to determine Xcode version: ${getErrorMessage(err)}`);
|
||||
return void 0;
|
||||
}
|
||||
}
|
||||
@@ -194027,6 +194023,10 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) {
|
||||
"Xcode",
|
||||
xcodeVer
|
||||
);
|
||||
} else if (xcodeVer === void 0) {
|
||||
action.logger.info(
|
||||
"Unable to determine Xcode version. Assuming it is not installed."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,5 +193,9 @@ export async function checkRunnerSupportsTracedAnalysis(
|
||||
"Xcode",
|
||||
xcodeVer,
|
||||
);
|
||||
} else if (xcodeVer === undefined) {
|
||||
action.logger.info(
|
||||
"Unable to determine Xcode version. Assuming it is not installed.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ test.serial("xcodeVersion returns undefined if symlink doesn't exist", (t) => {
|
||||
]);
|
||||
|
||||
checkExpectedLogMessages(t, logger.messages, [
|
||||
"Xcode is probably not installed.",
|
||||
"'/private/var/db/xcode_select_link' does not exist",
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -82,13 +82,11 @@ export function xcodeVersion(logger: Logger): semver.SemVer | undefined {
|
||||
});
|
||||
|
||||
if (stats === undefined) {
|
||||
logger.debug(
|
||||
`'${XCODE_SELECT_LINK_PATH}' does not exist. Xcode is probably not installed.`,
|
||||
);
|
||||
logger.debug(`'${XCODE_SELECT_LINK_PATH}' does not exist.`);
|
||||
return undefined;
|
||||
}
|
||||
if (!stats.isSymbolicLink()) {
|
||||
logger.warning(
|
||||
logger.debug(
|
||||
`${XCODE_SELECT_LINK_PATH} exists, but is not a symbolic link.`,
|
||||
);
|
||||
return undefined;
|
||||
@@ -98,7 +96,7 @@ export function xcodeVersion(logger: Logger): semver.SemVer | undefined {
|
||||
const xcodePath = fs.readlinkSync(XCODE_SELECT_LINK_PATH);
|
||||
|
||||
if (xcodePath === "") {
|
||||
logger.warning(
|
||||
logger.debug(
|
||||
`Resolving ${XCODE_SELECT_LINK_PATH} unexpectedly returned nothing.`,
|
||||
);
|
||||
return undefined;
|
||||
@@ -108,7 +106,7 @@ export function xcodeVersion(logger: Logger): semver.SemVer | undefined {
|
||||
const matchResult = xcodePath.match(XCODE_APP_FILENAME_PATTERN);
|
||||
|
||||
if (matchResult?.groups === undefined) {
|
||||
logger.warning(
|
||||
logger.debug(
|
||||
`Xcode path '${xcodePath}' does not contain expected pattern.`,
|
||||
);
|
||||
return undefined;
|
||||
@@ -118,14 +116,12 @@ export function xcodeVersion(logger: Logger): semver.SemVer | undefined {
|
||||
const version = semver.coerce(majorMinor);
|
||||
|
||||
if (version === null) {
|
||||
logger.warning(`Couldn't parse '${majorMinor}' as a semantic version.`);
|
||||
logger.debug(`Couldn't parse '${majorMinor}' as a semantic version.`);
|
||||
return undefined;
|
||||
}
|
||||
return version;
|
||||
} catch (err) {
|
||||
logger.warning(
|
||||
`Unable to determine Xcode version: ${getErrorMessage(err)}`,
|
||||
);
|
||||
logger.debug(`Unable to determine Xcode version: ${getErrorMessage(err)}`);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user