1
0
Fork 0
mirror of synced 2026-06-05 17:38:19 +00:00

Always log the service log

This commit is contained in:
Varun Sharma 2022-09-25 09:59:53 -07:00
commit a29f6823d1
3 changed files with 13 additions and 15 deletions

13
dist/post/index.js vendored
View file

@ -61488,13 +61488,12 @@ var cleanup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
lib_core.error(line);
});
}
if (!external_fs_.existsSync(doneFile)) {
var journalLog = external_child_process_.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
console.log("Service log:");
console.log(journalLog);
}
// Always log the service log
var journalLog = external_child_process_.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
console.log("Service log:");
console.log(journalLog);
try {
const cmd = "sudo";
const args = ["cp", external_path_default().join(__dirname, "cache.txt"), cacheFile];

File diff suppressed because one or more lines are too long

View file

@ -62,14 +62,13 @@ import path from "path";
});
}
if (!fs.existsSync(doneFile)) {
var journalLog = cp.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
// Always log the service log
var journalLog = cp.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
console.log("Service log:");
console.log(journalLog);
console.log("Service log:");
console.log(journalLog);
}
try {
const cmd = "sudo";
const args = ["cp", path.join(__dirname, "cache.txt"), cacheFile];