From fce2f32d9562c30e550d82816c072ceadd877c30 Mon Sep 17 00:00:00 2001 From: wangedmund77-cmyk Date: Sat, 30 May 2026 11:39:25 +0800 Subject: [PATCH] test: quote check-doc grep path --- test/lint/check-doc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/lint/check-doc.py b/test/lint/check-doc.py index f55d0f8cb7..75495122ba 100755 --- a/test/lint/check-doc.py +++ b/test/lint/check-doc.py @@ -17,7 +17,9 @@ FOLDER_TEST = 'src/test/' REGEX_ARG = r'\b(?:GetArg|GetArgs|GetBoolArg|GetIntArg|GetPathArg|IsArgSet|get_net)\("(-[^"]+)"' REGEX_DOC = r'AddArg\("(-[^"=]+?)(?:=|")' -CMD_ROOT_DIR = '$(git rev-parse --show-toplevel)/{}'.format(FOLDER_GREP) +# Quote the resolved path because contributors often keep checkouts in folders +# with spaces, and these commands are evaluated through the shell below. +CMD_ROOT_DIR = '"$(git rev-parse --show-toplevel)/{}"'.format(FOLDER_GREP) CMD_GREP_ARGS = r"git grep --perl-regexp '{}' -- {} ':(exclude){}'".format(REGEX_ARG, CMD_ROOT_DIR, FOLDER_TEST) CMD_GREP_WALLET_ARGS = r"git grep --function-context 'void WalletInit::AddWalletOptions' -- {} | grep AddArg".format(CMD_ROOT_DIR) CMD_GREP_WALLET_HIDDEN_ARGS = r"git grep --function-context 'void DummyWalletInit::AddWalletOptions' -- {}".format(CMD_ROOT_DIR)