Skip to content

Commit

Permalink
Proper read file
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Zeithaml <Martin.Zeithaml@broadcom.com>
  • Loading branch information
Martin-Zeithaml committed Apr 10, 2024
1 parent 5b6422c commit fbad8fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit fbad8fb

Please sign in to comment.