diff --git a/dist/verbs/build.js b/dist/verbs/build.js index 7af8564..a5e1c88 100644 --- a/dist/verbs/build.js +++ b/dist/verbs/build.js @@ -129,6 +129,11 @@ Implementation of the 'build' verb for HackMyResume. }); try { tFolder = _verifyTheme.call(this, _opts.theme); + if (tFolder.fluenterror) { + tFolder.quit = true; + this.err(tFolder.fluenterror, tFolder); + return; + } theme = _opts.themeObj = _loadTheme(tFolder); _addFreebieFormats(theme); } catch (_error) { @@ -406,9 +411,10 @@ Implementation of the 'build' verb for HackMyResume. if (!exists(tFolder)) { tFolder = PATH.resolve(themeNameOrPath); if (!exists(tFolder)) { - this.err(HMSTATUS.themeNotFound, { + return { + fluenterror: HMSTATUS.themeNotFound, data: _opts.theme - }); + }; } } return tFolder; diff --git a/dist/verbs/verb.js b/dist/verbs/verb.js index f76b7e0..f5340fc 100644 --- a/dist/verbs/verb.js +++ b/dist/verbs/verb.js @@ -73,7 +73,6 @@ Definition of the Verb class. payload["throw"] = hot; this.setError(errorCode, payload); if (payload.quit) { - console.log(payload); this.reject(errorCode); } this.fire('error', payload); diff --git a/src/verbs/build.coffee b/src/verbs/build.coffee index 8a4aa1f..e4cdb78 100644 --- a/src/verbs/build.coffee +++ b/src/verbs/build.coffee @@ -81,6 +81,10 @@ _build = ( src, dst, opts ) -> @stat HMEVENT.beforeTheme, { theme: _opts.theme } try tFolder = _verifyTheme.call @, _opts.theme + if tFolder.fluenterror + tFolder.quit = true + @err tFolder.fluenterror, tFolder + return theme = _opts.themeObj = _loadTheme tFolder _addFreebieFormats theme catch @@ -328,7 +332,7 @@ _verifyTheme = ( themeNameOrPath ) -> if !exists( tFolder ) tFolder = PATH.resolve themeNameOrPath if !exists tFolder - this.err HMSTATUS.themeNotFound, { data: _opts.theme } + return fluenterror: HMSTATUS.themeNotFound, data: _opts.theme tFolder diff --git a/src/verbs/verb.coffee b/src/verbs/verb.coffee index d6bbc48..2559b37 100644 --- a/src/verbs/verb.coffee +++ b/src/verbs/verb.coffee @@ -60,7 +60,6 @@ module.exports = class Verb payload.throw = hot @setError errorCode, payload if payload.quit - console.log payload @reject errorCode @fire 'error', payload if hot