From 64be18871d8f3b24670d7769a0d854b691741a6a Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Wed, 27 Feb 2019 09:01:20 +0100
Subject: [PATCH] fix: catch disk space error in branch

---
 lib/workers/branch/index.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js
index 0b2828bac6..cd02911ef0 100644
--- a/lib/workers/branch/index.js
+++ b/lib/workers/branch/index.js
@@ -330,6 +330,12 @@ async function processBranch(branchConfig, prHourlyLimitReached, packageFiles) {
       logger.debug('Passing lockfile-error up');
       throw err;
     }
+    if (
+      err.message &&
+      err.message.includes('ENOSPC: no space left on device')
+    ) {
+      throw new Error('disk-space');
+    }
     if (err.message.startsWith('disk-space')) {
       logger.debug('Passing disk-space error up');
       throw err;
-- 
GitLab