Improve/add log messages
This commit is contained in:
parent
7b0b42afec
commit
f6d9b6bcfa
3 changed files with 7 additions and 4 deletions
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 goBinaryPath = await (0, safe_which_1.safeWhich)("go");
|
||||||
const fileOutput = await (0, actions_util_1.getFileType)(goBinaryPath);
|
const fileOutput = await (0, actions_util_1.getFileType)(goBinaryPath);
|
||||||
if (fileOutput.includes("statically linked")) {
|
if (fileOutput.includes("statically linked")) {
|
||||||
|
logger.debug(`Applying static binary workaround for Go`);
|
||||||
// Create a directory that we can add to the system PATH.
|
// Create a directory that we can add to the system PATH.
|
||||||
const tempBinPath = path.resolve((0, actions_util_1.getTemporaryDirectory)(), "bin");
|
const tempBinPath = path.resolve((0, actions_util_1.getTemporaryDirectory)(), "bin");
|
||||||
fs.mkdirSync(tempBinPath, { recursive: true });
|
fs.mkdirSync(tempBinPath, { recursive: true });
|
||||||
|
|
@ -192,7 +193,7 @@ async function run() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
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
|
// 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);
|
const fileOutput = await getFileType(goBinaryPath);
|
||||||
|
|
||||||
if (fileOutput.includes("statically linked")) {
|
if (fileOutput.includes("statically linked")) {
|
||||||
|
logger.debug(`Applying static binary workaround for Go`);
|
||||||
|
|
||||||
// Create a directory that we can add to the system PATH.
|
// Create a directory that we can add to the system PATH.
|
||||||
const tempBinPath = path.resolve(getTemporaryDirectory(), "bin");
|
const tempBinPath = path.resolve(getTemporaryDirectory(), "bin");
|
||||||
fs.mkdirSync(tempBinPath, { recursive: true });
|
fs.mkdirSync(tempBinPath, { recursive: true });
|
||||||
|
|
@ -360,8 +362,8 @@ async function run() {
|
||||||
core.exportVariable(EnvVar.GO_BINARY_LOCATION, goWrapperPath);
|
core.exportVariable(EnvVar.GO_BINARY_LOCATION, goWrapperPath);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
core.warning(
|
logger.warning(
|
||||||
`Analyzing Go on Linux, but failed to install wrapper script: ${e}`,
|
`Analyzing Go on Linux, but failed to install wrapper script. Tracing custom builds may fail: ${e}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue