Shell:columns(): Better calc on Windows. Check TERM. Make testable.#105
Merged
danielbachhuber merged 5 commits intowp-cli:masterfrom Jun 8, 2017
Merged
Shell:columns(): Better calc on Windows. Check TERM. Make testable.#105danielbachhuber merged 5 commits intowp-cli:masterfrom
danielbachhuber merged 5 commits intowp-cli:masterfrom
Conversation
Member
@gitlost Does this fix https://travis-ci.org/wp-cli/package-command/jobs/239957268 ? |
Contributor
Author
|
It would yes, though updating package-command's FeatureContext would also. |
Member
Ah, good point. Thanks. |
danielbachhuber
requested changes
Jun 6, 2017
Member
danielbachhuber
left a comment
There was a problem hiding this comment.
The environment variables should be prefixed with PHP_CLI_TOOLS instead of WP_CLI (as this is a separate, standalone library). Other than that, looks good.
Contributor
Author
|
Ta, that's fixed now. |
danielbachhuber
approved these changes
Jun 8, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue wp-cli/wp-cli#4127
Caters for bash-like shells on Windows that return incorrect columns using
mode CON.Checks that
TERMenv var exists before usingtputotherwise it will write stuff to STDERR, which messes up tests.Makes testable with env var
WP_CLI_TEST_SHELL_COLUMNS_RESETto reset the$columnsstatic.Uses
function_exists()rather than checkingdisable_functionsini directive as it's more reliable (though to be totally correct should also check suhosin whitelist/blacklist).Parses output of
mode CONin a locale-indifferent way.