mirror of
https://github.com/step-security/harden-runner.git
synced 2026-06-05 21:17:06 +00:00
Merge pull request #496 from step-security/fix-enobufs
Fix ENOBUFS issue
This commit is contained in:
commit
cb605e52c2
3 changed files with 22 additions and 11 deletions
16
dist/post/index.js
vendored
16
dist/post/index.js
vendored
|
|
@ -3172,11 +3172,17 @@ var cleanup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
|
|||
}
|
||||
var disable_sudo = process.env.STATE_disableSudo;
|
||||
if (disable_sudo !== "true") {
|
||||
var journalLog = external_child_process_namespaceObject.execSync("sudo journalctl -u agent.service", {
|
||||
encoding: "utf8",
|
||||
});
|
||||
console.log("Service log:");
|
||||
console.log(journalLog);
|
||||
try {
|
||||
var journalLog = external_child_process_namespaceObject.execSync("sudo journalctl -u agent.service --lines=1000", {
|
||||
encoding: "utf8",
|
||||
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
|
||||
});
|
||||
console.log("agent.service log:");
|
||||
console.log(journalLog);
|
||||
}
|
||||
catch (error) {
|
||||
console.log("Warning: Could not fetch service logs:", error.message);
|
||||
}
|
||||
}
|
||||
try {
|
||||
yield addSummary();
|
||||
|
|
|
|||
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -82,11 +82,16 @@ import { isGithubHosted } from "./tls-inspect";
|
|||
|
||||
var disable_sudo = process.env.STATE_disableSudo;
|
||||
if (disable_sudo !== "true") {
|
||||
var journalLog = cp.execSync("sudo journalctl -u agent.service", {
|
||||
encoding: "utf8",
|
||||
});
|
||||
console.log("Service log:");
|
||||
console.log(journalLog);
|
||||
try {
|
||||
var journalLog = cp.execSync("sudo journalctl -u agent.service --lines=1000", {
|
||||
encoding: "utf8",
|
||||
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
|
||||
});
|
||||
console.log("agent.service log:");
|
||||
console.log(journalLog);
|
||||
} catch (error) {
|
||||
console.log("Warning: Could not fetch service logs:", error.message);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue