aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-03-12 14:00:52 +0100
committerLibravatar GitHub <noreply@github.com>2020-03-12 14:00:52 +0100
commit5b8a5ee7cb97685d862b7f08ade32abcbb77d40c (patch)
treeed86f275b4bfc7f275bc7cec5e53b5af2c72f1fa /scripts
parentMerge branch 'master' of https://github.com/getferdi/recipes (diff)
downloadferdium-recipes-5b8a5ee7cb97685d862b7f08ade32abcbb77d40c.tar.gz
ferdium-recipes-5b8a5ee7cb97685d862b7f08ade32abcbb77d40c.tar.zst
ferdium-recipes-5b8a5ee7cb97685d862b7f08ade32abcbb77d40c.zip
Let Promise errors crash the script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/verify-all.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/verify-all.js b/scripts/verify-all.js
index 0b6397b..fe7eefc 100644
--- a/scripts/verify-all.js
+++ b/scripts/verify-all.js
@@ -26,6 +26,12 @@ const decompress = (src, dest) => new Promise((resolve, reject) => {
26 }); 26 });
27}); 27});
28 28
29// Let Promise errors crash the script
30process.on('unhandledRejection', (error) => {
31 console.log('Promise rejection:', error);
32 process.exit(1);
33});
34
29// Let us work in an async environment 35// Let us work in an async environment
30(async () => { 36(async () => {
31 // Read list of all recipes 37 // Read list of all recipes
@@ -88,4 +94,4 @@ const decompress = (src, dest) => new Promise((resolve, reject) => {
88 } 94 }
89 95
90 console.log('All recipes are valid.'); 96 console.log('All recipes are valid.');
91})(); \ No newline at end of file 97})();