From 195304bbeaf55a8448c0dbb8cb1cc50e11bcb461 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 9 Dec 2023 15:27:06 +0200 Subject: [PATCH] Implemented a fail-safe mechanism to terminate a debugging session if an unknown CLI option is passed // Resolve #4699 --- HISTORY.rst | 1 + platformio/debug/cli.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index cd03107da6..5d000e278d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -25,6 +25,7 @@ test-driven methodologies, and modern toolchains for unrivaled success. * Drastically enhanced the speed of project building when operating in verbose mode (`issue #4783 `_) * Upgraded the build engine to the latest version of SCons (4.6.0) to improve build performance, reliability, and compatibility with other tools and systems (`release notes `__) * Enhanced the handling of built-in variables in |PIOCONF| during |INTERPOLATION| (`issue #4695 `_) +* Implemented a fail-safe mechanism to terminate a debugging session if an unknown CLI option is passed (`issue #4699 `_) * Rectified an issue where ``${platformio.name}`` erroneously represented ``None`` as the default `project name `__ (`issue #4717 `_) * Resolved an issue where the ``COMPILATIONDB_INCLUDE_TOOLCHAIN`` setting was not correctly applying to private libraries (`issue #4762 `_) * Resolved an issue where ``get_systype()`` inaccurately returned the architecture when executed within a Docker container on a 64-bit kernel with a 32-bit userspace (`issue #4777 `_) diff --git a/platformio/debug/cli.py b/platformio/debug/cli.py index 5c9375aec0..4dc016865b 100644 --- a/platformio/debug/cli.py +++ b/platformio/debug/cli.py @@ -54,7 +54,7 @@ @click.option("--environment", "-e", metavar="") @click.option("--load-mode", type=ProjectOptions["env.debug_load_mode"].type) @click.option("--verbose", "-v", is_flag=True) -@click.option("--interface", type=click.Choice(["gdb"])) +@click.option("--interface", type=click.Choice(["gdb"]), default="gdb") @click.argument("__unprocessed", nargs=-1, type=click.UNPROCESSED) @click.pass_context def cli(