From 5177c3e370a205bbc4d0afd2c9089339f126e0f9 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Thu, 14 Sep 2023 14:19:54 +0300 Subject: [PATCH] Use fs.rm instead of deprecated fs.rmdir for recursive opt --- src/auto-updater/bfx.mac.updater.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auto-updater/bfx.mac.updater.js b/src/auto-updater/bfx.mac.updater.js index cb1390f2..0709539f 100644 --- a/src/auto-updater/bfx.mac.updater.js +++ b/src/auto-updater/bfx.mac.updater.js @@ -2,6 +2,7 @@ const path = require('path') const fs = require('fs') +const fsPromises = require('fs/promises') const { spawn } = require('child_process') const { MacUpdater } = require('electron-updater') const extract = require('extract-zip') @@ -54,7 +55,7 @@ class BfxMacUpdater extends MacUpdater { const dist = path.join(root, '..') const exec = path.join(root, 'Contents/MacOS/Bitfinex Report') - await fs.promises.rmdir(root, { recursive: true }) + await fsPromises.rm(root, { recursive: true }) await extract( downloadedFilePath,