From fbad8fb5e275b01e91ef21f1001ccf485b7f210f Mon Sep 17 00:00:00 2001 From: Martin Zeithaml Date: Wed, 10 Apr 2024 14:52:41 +0200 Subject: [PATCH] Proper read file Signed-off-by: Martin Zeithaml --- lib/util.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/util.js b/lib/util.js index 6a3f2a1b..a06cad1a 100644 --- a/lib/util.js +++ b/lib/util.js @@ -19,7 +19,6 @@ if (!global.COM_RS_COMMON_LOGGER) { const path = require('path'); const fs = require('fs'); -const fsPromises = require('node:fs/promises'); const Promise = require('bluebird'); const ipaddr = require('ipaddr.js'); const dns = require('dns'); @@ -97,7 +96,7 @@ let zoweVersion = "0.0.0"; module.exports.setZoweVersionFromManifest = function setZoweVersionFromManifest(zoweConfig) { if (zoweConfig.zowe.runtimeDirectory) { try { - const contents = fsPromises.readFileSync(path.join(zoweConfig.zowe.runtimeDirectory, 'manifest.json'), {encoding: 'utf8'}); + const contents = fs.readFileSync(path.join(zoweConfig.zowe.runtimeDirectory, 'manifest.json'), {encoding: 'utf8'}); if (contents) { const asJson = JSON.parse(contents); if (asJson.version) {