mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Allow to force to output color ANSI-codes even if the output is a `pipe
(not a
tty
`)
This commit is contained in:
@ -15,6 +15,9 @@ PlatformIO 2.0
|
|||||||
and allowed to `change default upload reset method <http://docs.platformio.org/en/latest/platforms/espressif.html#custom-reset-method>`_
|
and allowed to `change default upload reset method <http://docs.platformio.org/en/latest/platforms/espressif.html#custom-reset-method>`_
|
||||||
for Espressif development platform
|
for Espressif development platform
|
||||||
(`issue #444 <https://github.com/platformio/platformio/issues/444>`_)
|
(`issue #444 <https://github.com/platformio/platformio/issues/444>`_)
|
||||||
|
* Allowed to force to output color ANSI-codes even if the output is a ``pipe``
|
||||||
|
(not a ``tty``)
|
||||||
|
(`issue #465 <https://github.com/platformio/platformio/issues/465>`_)
|
||||||
* Set 1Mb SPIFFS for Espressif boards by default
|
* Set 1Mb SPIFFS for Espressif boards by default
|
||||||
(`issue #458 <https://github.com/platformio/platformio/issues/458>`_)
|
(`issue #458 <https://github.com/platformio/platformio/issues/458>`_)
|
||||||
* Fixed builder for mbed framework and ST STM32 platform
|
* Fixed builder for mbed framework and ST STM32 platform
|
||||||
|
@ -39,6 +39,11 @@ Currently, PlatformIO uses it to disable prompts.
|
|||||||
In other words, ``CI=true`` automatically setup
|
In other words, ``CI=true`` automatically setup
|
||||||
:envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS=false <PLATFORMIO_SETTING_ENABLE_PROMPTS>`.
|
:envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS=false <PLATFORMIO_SETTING_ENABLE_PROMPTS>`.
|
||||||
|
|
||||||
|
.. envvar:: PLATFORMIO_FORCE_COLOR
|
||||||
|
|
||||||
|
Force to output color ANSI-codes even if the output is a ``pipe`` (not a ``tty``).
|
||||||
|
The possible values are ``true`` and ``false``. Default is ``PLATFORMIO_FORCE_COLOR=false``.
|
||||||
|
|
||||||
.. envvar:: PLATFORMIO_HOME_DIR
|
.. envvar:: PLATFORMIO_HOME_DIR
|
||||||
|
|
||||||
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_home_dir`.
|
Allows to override :ref:`projectconf` option :ref:`projectconf_pio_home_dir`.
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (2, 7, "2.dev4")
|
VERSION = (2, 7, "2.dev5")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from os import listdir
|
from os import getenv, listdir
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from platform import system
|
from platform import system
|
||||||
from sys import exit as sys_exit
|
from sys import exit as sys_exit
|
||||||
@ -94,6 +94,14 @@ def main():
|
|||||||
"Invalid installation of Python `requests` package`. See "
|
"Invalid installation of Python `requests` package`. See "
|
||||||
"< https://github.com/platformio/platformio/issues/252 >")
|
"< https://github.com/platformio/platformio/issues/252 >")
|
||||||
|
|
||||||
|
# handle PLATFORMIO_FORCE_COLOR
|
||||||
|
if str(getenv("PLATFORMIO_FORCE_COLOR", "")).lower() == "true":
|
||||||
|
try:
|
||||||
|
# pylint: disable=protected-access
|
||||||
|
click._compat.isatty = lambda stream: True
|
||||||
|
except: # pylint: disable=bare-except
|
||||||
|
pass
|
||||||
|
|
||||||
cli(None, None, None)
|
cli(None, None, None)
|
||||||
except Exception as e: # pylint: disable=W0703
|
except Exception as e: # pylint: disable=W0703
|
||||||
if not isinstance(e, exception.ReturnErrorCode):
|
if not isinstance(e, exception.ReturnErrorCode):
|
||||||
|
Reference in New Issue
Block a user