Skip to content

Commit

Permalink
Merge pull request #496 from step-security/fix-enobufs
Browse files Browse the repository at this point in the history
Fix ENOBUFS issue
  • Loading branch information
varunsh-coder authored Jan 20, 2025
2 parents 18f6947 + 61144dd commit cb605e5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
16 changes: 11 additions & 5 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions src/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit cb605e5

Please sign in to comment.