From 538bb871dbb7e0bc5a3475fa46ac32c339049f40 Mon Sep 17 00:00:00 2001 From: Hans-Albert Maritz Date: Sun, 5 Jul 2020 21:33:59 +1000 Subject: [PATCH] fix not writing hash when hash only option is specified. --- lib/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/main.js b/lib/main.js index 215ca49..0682014 100644 --- a/lib/main.js +++ b/lib/main.js @@ -53,6 +53,11 @@ const watchFile = ({ if (isHashOnly) { console.log('Updating hash only because --hash-only is true.') + try { + fs.writeFileSync(packageHashPath, recentDigest) // write to hash to file for future use + } catch (error) { + console.log(error) + } return true }