From dfe459c0ab956af70ab83fc8ae9c4a67f2cdfe00 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 16 Apr 2025 15:44:14 +0200 Subject: [PATCH] Fix `config.py --help` when $PWD contains `%` Fix `config.py --help` raising an exception (or otherwise misbehaving, in rare cases) when the current working directory contains a percent character. This was due to a percent escape bug. Signed-off-by: Gilles Peskine --- scripts/mbedtls_framework/config_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mbedtls_framework/config_common.py b/scripts/mbedtls_framework/config_common.py index 123785d4b9..58908ceeae 100644 --- a/scripts/mbedtls_framework/config_common.py +++ b/scripts/mbedtls_framework/config_common.py @@ -416,7 +416,7 @@ def _common_parser_options(self, default_file_path): self.parser.add_argument( '--file', '-f', help="""File to read (and modify if requested). Default: {}. - """.format(default_file_path)) + """.format(str(default_file_path).replace('%', '%%'))) self.parser.add_argument( '--force', '-o', action='store_true',