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

Grammar correction and send warning to stderr #264

Merged
merged 2 commits into from Dec 6, 2013
Merged

Grammar correction and send warning to stderr #264

merged 2 commits into from Dec 6, 2013

Conversation

melvyn-sopacua
Copy link

The commit messages should explain it all. In short:

  • grammar correction
  • move a warning to stderr to prevent it from messing with scripted output

Melvyn Sopacua added 2 commits December 4, 2013 10:45
This warning, while useful in interactive usage, complicates things in
script. Errors/warnings belong in stderr, especially if a command can
finish it's task succefully.

This fix was prompted by using n98 in a cron script, like so:
    #!/bin/sh
    # ...
    prefix=`n98-magerun.phar db:info prefix`
    n98-magerun.phar db:query "TRUNCATE ${prefix}core_url_rewrites;"
    # ...

This generated an SQL syntax error.

TODO:
- There may be more cases where warnings should be moved to stderr.
- Investigate if the formatter can be extended to automatically route
  <error> tag to OutputInterface::getErrorOutput() for a better fix.
cmuench added a commit that referenced this pull request Dec 6, 2013
Grammar correction and send warning to stderr
@cmuench cmuench merged commit 7eb7e94 into netz98:develop Dec 6, 2013
steverobbins pushed a commit to steverobbins/n98-magerun that referenced this pull request Apr 7, 2015
Grammar correction and send warning to stderr
steverobbins pushed a commit to steverobbins/n98-magerun that referenced this pull request Apr 7, 2015
Grammar correction and send warning to stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants