From db0b456d5f832674877b0eb15bd7e1e7fd9c32d9 Mon Sep 17 00:00:00 2001 From: Cyril Auburtin Date: Fri, 29 Nov 2024 23:59:12 +0100 Subject: [PATCH] Remove deprecated fs.exists --- src/OAuthClient.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/OAuthClient.js b/src/OAuthClient.js index b40345b3..1d7cc396 100644 --- a/src/OAuthClient.js +++ b/src/OAuthClient.js @@ -58,9 +58,7 @@ function OAuthClient(config) { if (this.logging) { const dir = './logs'; - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); - } + fs.mkdirSync(dir, { recursive: true }); this.logger = winston.createLogger({ level: 'info', format: winston.format.combine(