Fix ENOBUFS issue

This commit is contained in:
Varun Sharma 2025-01-19 14:50:09 -08:00
commit 6f6fa07e47
3 changed files with 5 additions and 3 deletions

3
dist/post/index.js vendored
View file

@ -3172,8 +3172,9 @@ 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", {
var journalLog = external_child_process_namespaceObject.execSync("sudo journalctl -u agent.service --lines=1000", {
encoding: "utf8",
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
});
console.log("Service log:");
console.log(journalLog);

File diff suppressed because one or more lines are too long

View file

@ -82,8 +82,9 @@ 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", {
var journalLog = cp.execSync("sudo journalctl -u agent.service --lines=1000", {
encoding: "utf8",
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
});
console.log("Service log:");
console.log(journalLog);