changing PWNDBG_DISABLE_COLORS to NO_COLOR #3191 (#3239)

pull/3242/head
Deepanshu Sharma 4 months ago committed by GitHub
parent 5d8e23ec42
commit 870825cd5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,7 +6,7 @@ Pwndbg relies on several environment variables to customize its behavior. Below
- `EDITOR`, `VISUAL`: Used by the `cymbol` command to open an editor. - `EDITOR`, `VISUAL`: Used by the `cymbol` command to open an editor.
- `HOME`, `XDG_CACHE_HOME`: Used by `lib.tempfile` to determine temporary file locations. - `HOME`, `XDG_CACHE_HOME`: Used by `lib.tempfile` to determine temporary file locations.
- `PWNDBG_VENV_PATH`: Specifies the virtual environment path for Pwndbg. - `PWNDBG_VENV_PATH`: Specifies the virtual environment path for Pwndbg.
- `PWNDBG_DISABLE_COLORS`: Disables colored output in Pwndbg. - `NO_COLOR`: Disables colored output in Pwndbg.
- `PWNDBG_LOGLEVEL`: Initial log level to use for log messages. - `PWNDBG_LOGLEVEL`: Initial log level to use for log messages.
- `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`: Used by the `ai` command for accessing respective AI APIs. - `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`: Used by the `ai` command for accessing respective AI APIs.
- `GITHUB_ACTIONS`, `RUN_FLAKY`: Used by `tests_commands.py` to determine the test environment. - `GITHUB_ACTIONS`, `RUN_FLAKY`: Used by `tests_commands.py` to determine the test environment.

@ -145,7 +145,7 @@ def unstylize(x: str) -> str:
disable_colors = theme.add_param( disable_colors = theme.add_param(
"disable-colors", "disable-colors",
bool(os.environ.get("PWNDBG_DISABLE_COLORS")), bool(os.environ.get("NO_COLOR")),
"whether to color the output or not", "whether to color the output or not",
) )

@ -69,7 +69,7 @@ class GDBTestHost(TestHost):
env["COVERAGE_FILE"] = str(coverage_out) env["COVERAGE_FILE"] = str(coverage_out)
env["COVERAGE_PROCESS_START"] = str(self._pwndbg_root / "pyproject.toml") env["COVERAGE_PROCESS_START"] = str(self._pwndbg_root / "pyproject.toml")
env["PWNDBG_LAUNCH_TEST"] = case env["PWNDBG_LAUNCH_TEST"] = case
env["PWNDBG_DISABLE_COLORS"] = "1" env["NO_COLOR"] = "1"
env["GDB_BIN_PATH"] = str(self._gdb_path) env["GDB_BIN_PATH"] = str(self._gdb_path)
env["TEST_BINARIES_ROOT"] = str(self._binaries_root) env["TEST_BINARIES_ROOT"] = str(self._binaries_root)
if interactive: if interactive:

@ -63,7 +63,7 @@ async def _run(ctrl: Any, outer: Callable[..., Coroutine[Any, Any, None]]) -> No
def run(pytest_args: List[str], pytest_plugins: List[Any] | None) -> int: def run(pytest_args: List[str], pytest_plugins: List[Any] | None) -> int:
# The import path is set up before this function is called. # The import path is set up before this function is called.
os.environ["PWNDBG_DISABLE_COLORS"] = "1" os.environ["NO_COLOR"] = "1"
from pwndbginit import pwndbg_lldb from pwndbginit import pwndbg_lldb

@ -197,7 +197,7 @@ run_test() {
COVERAGE_PROCESS_START=$COVERAGERC_PATH \ COVERAGE_PROCESS_START=$COVERAGERC_PATH \
USE_PDB="$should_drop_to_pdb" \ USE_PDB="$should_drop_to_pdb" \
PWNDBG_LAUNCH_TEST="${test_case}" \ PWNDBG_LAUNCH_TEST="${test_case}" \
PWNDBG_DISABLE_COLORS=1 \ NO_COLOR=1 \
PWNDBG_ARCH="${arch}" \ PWNDBG_ARCH="${arch}" \
PWNDBG_KERNEL_TYPE="${kernel_type}" \ PWNDBG_KERNEL_TYPE="${kernel_type}" \
PWNDBG_KERNEL_VERSION="${kernel_version}" \ PWNDBG_KERNEL_VERSION="${kernel_version}" \

Loading…
Cancel
Save