mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Report file contents
This commit is contained in:
5
lib/util.js
generated
5
lib/util.js
generated
@@ -160,9 +160,10 @@ function getTotalMemoryAvailable(logger) {
|
||||
"/sys/fs/cgroup/memory.max",
|
||||
]) {
|
||||
if (fs.existsSync(limitFile)) {
|
||||
const limit = Number(fs.readFileSync(limitFile, "utf8"));
|
||||
const contents = fs.readFileSync(limitFile, "utf8");
|
||||
const limit = Number(contents);
|
||||
if (Number.isInteger(limit)) {
|
||||
logger.info(`While resolving RAM, found cgroup limit of ${limit / (1024 * 1024)} MiB in ${limitFile}.`);
|
||||
logger.info(`While resolving RAM, found cgroup limit of ${limit / (1024 * 1024)} MiB based on file contents "${contents}" in ${limitFile}.`);
|
||||
return limit;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user