Skip to content

Commit e0bcd19

Browse files
committed
Change log order in init
1 parent b582a14 commit e0bcd19

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/commands/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = function init(args) {
2222
logger.error(message);
2323
utils.sendUsageReport(null, args, message, Constants.messageTypes.ERROR, 'bstack_json_already_exists');
2424
} else {
25-
fileHelpers.write(config, null, utils.configCreated(args));
25+
fileHelpers.write(config, null, args, utils.configCreated);
2626
}
2727
});
2828
}

bin/helpers/fileHelpers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ const logger = require("./logger").winstonLogger,
66
Constants = require("../helpers/constants"),
77
config = require("../helpers/config");
88

9-
exports.write = function(f, message, cb) {
9+
exports.write = function(f, message, args, cb) {
1010
message = message || 'Creating';
1111
fs.writeFile(f.path, f.file, function() {
12-
logger.info(message + " file: " + path.relative(process.cwd(), f.path));
13-
cb && cb()
12+
logger.info(message + " file: " + f.path);
13+
cb && cb(args)
1414
});
1515
}
1616

test/unit/bin/helpers/fileHelpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("fileHelpers", () => {
3838
},
3939
});
4040

41-
fileHelpers.write("./random_path", "writing successful", callbackStub);
41+
fileHelpers.write("./random_path", "writing successful", {}, callbackStub);
4242
sinon.assert.calledOnce(writeFileStub);
4343
expect(dataMock).to.eql(1);
4444
});

0 commit comments

Comments
 (0)