diff --git a/package.json b/package.json index 27cf799e..b150b5da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ardrive-cli", - "version": "1.20.0", + "version": "1.20.1", "description": "The ArDrive Command Line Interface (CLI is a Node.js application for terminal-based ArDrive workflows. It also offers utility operations for securely interacting with Arweave wallets and inspecting various Arweave blockchain conditions.", "main": "./lib/index.js", "bin": { diff --git a/src/utils/temp_folder.ts b/src/utils/temp_folder.ts index ad9e0c58..e8c8ec9b 100644 --- a/src/utils/temp_folder.ts +++ b/src/utils/temp_folder.ts @@ -73,5 +73,7 @@ export function getTempFolder(): string { export function cleanUpTempFolder(): void { const tempFolderPath = platformTempFolder(); - fs.rmdirSync(tempFolderPath, { recursive: true }); + if (fs.existsSync(tempFolderPath)) { + fs.rmdirSync(tempFolderPath, { recursive: true }); + } }