fix: fall back to /bin/echo for non-usr-merged distros

This commit is contained in:
Rohan Prabhu
2026-08-25 16:36:14 +05:30
parent 05e31511f8
commit 42e6daab6e
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -32303,7 +32303,9 @@ process.on("unhandledRejection", (reason) => {
}))();
function handleAgentBravoCleanup() {
return cleanup_awaiter(this, void 0, void 0, function* () {
external_child_process_.execFileSync("/usr/bin/echo", ["step_policy_jobend"]);
// Non-usr-merged distros (e.g. Debian bullseye) only have /bin/echo.
const echoBin = external_fs_.existsSync("/usr/bin/echo") ? "/usr/bin/echo" : "/bin/echo";
external_child_process_.execFileSync(echoBin, ["step_policy_jobend"]);
const doneFile = "/home/agent/done.json";
let counter = 0;
while (true) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -86,7 +86,9 @@ process.on("unhandledRejection", (reason) => {
})();
async function handleAgentBravoCleanup() {
cp.execFileSync("/usr/bin/echo", ["step_policy_jobend"]);
// Non-usr-merged distros (e.g. Debian bullseye) only have /bin/echo.
const echoBin = fs.existsSync("/usr/bin/echo") ? "/usr/bin/echo" : "/bin/echo";
cp.execFileSync(echoBin, ["step_policy_jobend"]);
const doneFile = "/home/agent/done.json";
let counter = 0;