forked from platformio/platformio-core
Disable TTY coloring with "PLATFORMIO_DISABLE_COLOR" system environment // Resolve #2956
This commit is contained in:
@ -9,8 +9,9 @@ PlatformIO 4.0
|
||||
4.0.3 (2019-??-??)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Update SCons tool to 3.1.1
|
||||
* Support `PLATFORMIO_DISABLE_COLOR <http://docs.platformio.org/en/latest/envvars.html#envvar-PLATFORMIO_DISABLE_COLOR>`__ system environment variable which disables color ANSI-codes in a terminal output (`issue #2956 <https://github.com/platformio/platformio-core/issues/2956>`_)
|
||||
* Generate ``.ccls`` LSP file for `Vim <http://docs.platformio.org/en/page/vim.html>`__ cross references, hierarchies, completion and semantic highlighting (`issue #2952 <https://github.com/platformio/platformio-core/issues/2952>`_)
|
||||
* Updated SCons tool to 3.1.1
|
||||
* Remove ProjectConfig cache when "platformio.ini" was modified outside
|
||||
* Fixed an issue with PIO Unified Debugger on Windows OS when debug server is piped
|
||||
* Fixed an issue when `--upload-port <http://docs.platformio.org/page/userguide/cmd_run.html#cmdoption-platformio-run-upload-port>`__ CLI flag does not override declared `upload_port <http://docs.platformio.org/page/projectconf/section_env_upload.html#upload-port>`__ option in `"platformio.ini" (Project Configuration File) <https://docs.platformio.org/page/projectconf.html>`__
|
||||
|
2
docs
2
docs
Submodule docs updated: 6fd93411b2...771f77b155
@ -55,13 +55,15 @@ def configure():
|
||||
except (AttributeError, ImportError):
|
||||
pass
|
||||
|
||||
# handle PLATFORMIO_FORCE_COLOR
|
||||
if str(os.getenv("PLATFORMIO_FORCE_COLOR", "")).lower() == "true":
|
||||
try:
|
||||
try:
|
||||
if str(os.getenv("PLATFORMIO_DISABLE_COLOR", "")).lower() == "true":
|
||||
# pylint: disable=protected-access
|
||||
click._compat.isatty = lambda stream: False
|
||||
elif str(os.getenv("PLATFORMIO_FORCE_COLOR", "")).lower() == "true":
|
||||
# pylint: disable=protected-access
|
||||
click._compat.isatty = lambda stream: True
|
||||
except: # pylint: disable=bare-except
|
||||
pass
|
||||
except: # pylint: disable=bare-except
|
||||
pass
|
||||
|
||||
# Handle IOError issue with VSCode's Terminal (Windows)
|
||||
click_echo_origin = [click.echo, click.secho]
|
||||
|
Reference in New Issue
Block a user