1
mirror of https://github.com/jakejarvis/hugo-extended.git synced 2025-09-15 22:35:31 -04:00

forward Hugo's exit code so this module itself reports success/failure (fixes #77)

This commit is contained in:
2021-10-13 14:06:15 -04:00
parent a390ab6cc7
commit c55d3d58c3
3 changed files with 63 additions and 21 deletions

View File

@@ -6,4 +6,7 @@ import hugo from "../index.js";
const args = process.argv.slice(2);
spawn(hugo, args, { stdio: "inherit" })
.on("exit", process.exit);
.on("exit", (code) => {
// forward Hugo's exit code so this module itself reports success/failure
process.exit(code);
});