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

@kibertoad kibertoad commented Nov 2, 2018

Needs test. See #2884 for a good example.

@avaly
Copy link
Contributor Author

@avaly 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

@kibertoad kibertoad commented Nov 6, 2018

@avaly Aaaand it has landed :)

@avaly avaly force-pushed the feature/cli-verbose branch from fc6e7ed to 5265626 Dec 30, 2018
@avaly
Copy link
Contributor Author

@avaly 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

@kibertoad kibertoad Dec 30, 2018

Should this be commented out?

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

@kibertoad kibertoad commented Dec 30, 2018

@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 Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants