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

Conversation

Projects
None yet
2 participants
@avaly
Copy link
Contributor

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

This comment has been minimized.

Copy link
Collaborator

kibertoad commented Nov 2, 2018

Needs test. See #2884 for a good example.

@avaly

This comment has been minimized.

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

This comment has been minimized.

Copy link
Collaborator

kibertoad commented Nov 6, 2018

@avaly Aaaand it has landed :)

@avaly avaly force-pushed the avaly:feature/cli-verbose branch from fc6e7ed to 5265626 Dec 30, 2018

@avaly

This comment has been minimized.

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}`);

This comment has been minimized.

Copy link
@kibertoad

kibertoad Dec 30, 2018

Collaborator

Should this be commented out?

@kibertoad kibertoad merged commit 2430ae0 into tgriesser:master Dec 30, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 84.943%
Details
@kibertoad

This comment has been minimized.

Copy link
Collaborator

kibertoad commented Dec 30, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.