ensure we have atleast 1GB before making an update

This commit is contained in:
Girish Ramakrishnan
2021-11-16 18:20:12 -08:00
parent b6ee1fb662
commit 6d864d3621
2 changed files with 6 additions and 8 deletions
+3 -1
View File
@@ -148,9 +148,11 @@ async function update(boxUpdateInfo, options, progressCallback) {
progressCallback({ percent: 10, message: 'Backing up' });
await backuptask.fullBackup({ preserveSecs: 3*7*24*60*60 }, (progress) => progressCallback({ percent: 10+progress.percent*70/100, message: progress.message }));
await checkFreeDiskSpace(1024*1024*1024); // check again in case backup is in same disk
}
debug('updating box %s', boxUpdateInfo.sourceTarballUrl);
debug(`Updating box with ${boxUpdateInfo.sourceTarballUrl}`);
progressCallback({ percent: 70, message: 'Installing update' });