Merge pull request #178 from h0x0er/issue173

Add bug fix
This commit is contained in:
Varun Sharma 2022-09-13 23:41:21 -07:00 committed by GitHub
commit 4f7a1730db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

5
dist/post/index.js vendored
View file

@ -61494,12 +61494,17 @@ var cleanup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
});
console.log("Service log:");
console.log(journalLog);
}
try {
const cmd = "sudo";
const args = ["cp", external_path_default().join(__dirname, "cache.txt"), cacheFile];
external_child_process_.execFileSync(cmd, args);
const cacheResult = yield cache.saveCache([cacheFile], cacheKey);
console.log(cacheResult);
}
catch (exception) {
console.log(exception);
}
}))();
function sleep(ms) {
return new Promise((resolve) => {

File diff suppressed because one or more lines are too long

View file

@ -66,14 +66,18 @@ import path from "path";
var journalLog = cp.execSync("sudo journalctl -u agent.service", {
encoding: "utf8",
});
console.log("Service log:");
console.log(journalLog);
}
try {
const cmd = "sudo";
const args = ["cp", path.join(__dirname, "cache.txt"), cacheFile];
cp.execFileSync(cmd, args);
const cacheResult = await cache.saveCache([cacheFile], cacheKey);
console.log(cacheResult);
} catch (exception) {
console.log(exception);
}
})();