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

Commit

Permalink
fix: connect new init dredd back to the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed Aug 10, 2018
1 parent f233173 commit 5c03f0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const spawnSync = require('cross-spawn').sync;
const configUtils = require('./config-utils');
const Dredd = require('./dredd');
const ignorePipeErrors = require('./ignore-pipe-errors');
const interactiveConfig = require('./interactive-config');
const interactiveConfig = require('./init');
const logger = require('./logger');
const { applyLoggingOptions } = require('./configuration');
const { spawn } = require('./child-process');
Expand Down Expand Up @@ -149,6 +149,8 @@ Example:
this.finished = true;
interactiveConfig(this.argv, (config) => {
configUtils.save(config);
}, (err) => {
if (err) { logger.error('Could not configure Dredd', err); }
this._processExit(0);
});

Expand Down
8 changes: 3 additions & 5 deletions src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ function init(config, save, callback) {
if (error) { callback(error); }

const updatedConfig = applyAnswers(config, answers);
save(updatedConfig, (saveError) => {
if (saveError) { callback(saveError); }
save(updatedConfig);
printClosingMessage(updatedConfig);

printClosingMessage(updatedConfig);
callback(null, updatedConfig);
});
callback();
});
}

Expand Down

0 comments on commit 5c03f0c

Please sign in to comment.