This commit is contained in:
Girish Ramakrishnan
2019-08-12 21:47:22 -07:00
parent 6d38b3255c
commit e0ac0393fe

View File

@@ -162,6 +162,8 @@ function checkFreeDiskSpace(neededSpace, callback) {
// can probably be a bit more aggressive here since a new update can bring in new docker images
df.file('/').then(function (diskUsage) {
if (diskUsage.available < neededSpace) return callback(new UpdaterError(UpdaterError.NO_SPACE, 'Not enough disk space'));
callback(null);
}).catch(function (error) {
callback(new UpdaterError(UpdaterError.INTERNAL_ERROR, error));
});