Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interactive shell bug #2743

Merged
merged 1 commit into from
Jan 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 6 additions & 7 deletions lib/command/interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Codecept = require('../codecept');
const event = require('../event');
const output = require('../output');

module.exports = function (path, options) {
module.exports = async function (path, options) {
// Backward compatibility for --profile
process.profile = options.profile;
process.env.profile = options.profile;
Expand All @@ -14,11 +14,8 @@ module.exports = function (path, options) {
const codecept = new Codecept(config, options);
codecept.init(testsPath);

codecept.runBootstrap((err) => {
if (err) {
output.error(`Error while running bootstrap file :${err}`);
return;
}
try {
await codecept.bootstrap();

if (options.verbose) output.level(3);

Expand All @@ -36,5 +33,7 @@ module.exports = function (path, options) {
recorder.add(() => event.emit(event.suite.after, {}));
recorder.add(() => event.emit(event.all.result, {}));
recorder.add(() => codecept.teardown());
});
} catch (err) {
output.error(`Error while running bootstrap file :${err}`);
}
};