Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Filesystem wallet promises (#4155)
Browse files Browse the repository at this point in the history
* updates to remove promisification

Signed-off-by: Matthew B White <[email protected]>

* additional promisify removal

Signed-off-by: Matthew B White <[email protected]>
  • Loading branch information
mbwhite authored and cazfletch committed Jun 14, 2018
1 parent 26ef1b6 commit 3babcef
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/composer-common/lib/businessnetworkdefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const QueryManager = require('./querymanager');
const ScriptManager = require('./scriptmanager');
const semver = require('semver');
const thenify = require('thenify');
const util = require('util');

const ENCODING = 'utf8';
const LOG = Logger.getLog('BusinessNetworkDefinition');
Expand Down Expand Up @@ -717,8 +716,6 @@ class BusinessNetworkDefinition {
mode: createFileMode
};

const writeFile = util.promisify(fs.writeFile);

const promises = [];

for (let fileEntry of this._getAllArchiveFiles()) {
Expand All @@ -728,7 +725,7 @@ class BusinessNetworkDefinition {
const filePath = fsPath.resolve(directoryPath, ...fileNameParts);
const dirname = fsPath.dirname(filePath);
const writeFilePromise = mkdirp(dirname, mkdirpOptions)
.then(() => writeFile(filePath, fileContent, writeFileOptions));
.then(() => fs.writeFileSync(filePath, fileContent, writeFileOptions));
promises.push(writeFilePromise);
}

Expand Down

0 comments on commit 3babcef

Please sign in to comment.