mirror of
https://github.com/github/codeql-action.git
synced 2026-11-21 08:39:33 +00:00
Improve/add log messages
This commit is contained in:
3
lib/init-action.js
generated
3
lib/init-action.js
generated
@@ -178,6 +178,7 @@ async function run() {
|
||||
const goBinaryPath = await (0, safe_which_1.safeWhich)("go");
|
||||
const fileOutput = await (0, actions_util_1.getFileType)(goBinaryPath);
|
||||
if (fileOutput.includes("statically linked")) {
|
||||
logger.debug(`Applying static binary workaround for Go`);
|
||||
// Create a directory that we can add to the system PATH.
|
||||
const tempBinPath = path.resolve((0, actions_util_1.getTemporaryDirectory)(), "bin");
|
||||
fs.mkdirSync(tempBinPath, { recursive: true });
|
||||
@@ -192,7 +193,7 @@ async function run() {
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
core.warning(`Analyzing Go on Linux, but failed to install wrapper script: ${e}`);
|
||||
logger.warning(`Analyzing Go on Linux, but failed to install wrapper script. Tracing custom builds may fail: ${e}`);
|
||||
}
|
||||
}
|
||||
// Limit RAM and threads for extractors. When running extractors, the CodeQL CLI obeys the
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -342,6 +342,8 @@ async function run() {
|
||||
const fileOutput = await getFileType(goBinaryPath);
|
||||
|
||||
if (fileOutput.includes("statically linked")) {
|
||||
logger.debug(`Applying static binary workaround for Go`);
|
||||
|
||||
// Create a directory that we can add to the system PATH.
|
||||
const tempBinPath = path.resolve(getTemporaryDirectory(), "bin");
|
||||
fs.mkdirSync(tempBinPath, { recursive: true });
|
||||
@@ -360,8 +362,8 @@ async function run() {
|
||||
core.exportVariable(EnvVar.GO_BINARY_LOCATION, goWrapperPath);
|
||||
}
|
||||
} catch (e) {
|
||||
core.warning(
|
||||
`Analyzing Go on Linux, but failed to install wrapper script: ${e}`,
|
||||
logger.warning(
|
||||
`Analyzing Go on Linux, but failed to install wrapper script. Tracing custom builds may fail: ${e}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user