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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verbose option to CLI commands #2887

Merged
merged 1 commit into from Dec 30, 2018
Merged

Conversation

avaly
Copy link
Contributor

@avaly avaly commented Nov 2, 2018

The following CLI commands get a --verbose option, which is used to determine whether to output the resulting log from the command action:

  • migrate:latest
  • migrate:rollback
  • seed:run

@kibertoad
Copy link
Collaborator

Needs test. See #2884 for a good example.

@avaly
Copy link
Contributor Author

avaly commented Nov 3, 2018

I'll wait for that PR to land first and then I'll add similar tests.

@kibertoad
Copy link
Collaborator

@avaly Aaaand it has landed :)

@avaly
Copy link
Contributor Author

avaly commented Dec 30, 2018

I've added tests for the updated code in this PR.

@@ -9,12 +9,14 @@ function assertExec(cmd, desc) {
desc = desc || 'Run ' + cmd;
return new Promise((resolve, reject) => {
let stderr = '';
console.log(`Executing: ${cmd}`);
let stdout = '';
// console.log(`Executing: ${cmd}`);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be commented out?

@kibertoad kibertoad merged commit 2430ae0 into knex:master Dec 30, 2018
@kibertoad
Copy link
Collaborator

@avaly Thank you! Could you also please create a PR with documentation at https://github.com/knex/documentation ?

@avaly avaly deleted the feature/cli-verbose branch December 29, 2019 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants