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

This commit is contained in:
jake committed 2021-10-13 14:06:15 -04:00
1 parent a390ab6cc7
commit c55d3d58c3
3 files changed
+63 -21

No files matched your search

+4 -1
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);
});