aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gulpfile.babel.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index d15346f..cc568fd 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -13,8 +13,12 @@ const hugoBin = "hugo";
gulp.task("hugo", (cb) => {
const args = ["-d", "../dist", "-s", "site", "-v"];
- return cp.spawn(hugoBin, args, {stdio: "inherit"}).on("close", () => {
- browserSync.reload();
+ return cp.spawn(hugoBin, args, {stdio: "inherit"}).on("close", (code) => {
+ if (code === 0) {
+ browserSync.reload();
+ } else {
+ browserSync.notify("Hugo build failed :(");
+ }
cb();
});
});