From a7ab45ace25c4b987994158687d04de07ed20a96 Mon Sep 17 00:00:00 2001 From: Jason1 Lin Date: Sun, 16 Mar 2025 03:05:58 +0800 Subject: BaseTools/FMMT: Fix GUID Tool Not Found the Shell Script Issue - FMMT tool would use the "PATH" environment variable for locating the required GUID tool. - On Windows-like system, batch file not found in the "PATH" environment variable when "shell=False". - This issue required commands to include program extensions or absolute paths. - This patch sets "shell=True" to extend the support for batch files, including scripts in BinWrappers under BaseTools. - Converted input commands from lists to strings to ensure proper argument interpretation in POSIX-like shell scripts. Signed-off-by: Jason1 Lin --- BaseTools/Source/Python/FMMT/core/GuidTools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'BaseTools/Source/Python') diff --git a/BaseTools/Source/Python/FMMT/core/GuidTools.py b/BaseTools/Source/Python/FMMT/core/GuidTools.py index f6bdeff..d413fe3 100644 --- a/BaseTools/Source/Python/FMMT/core/GuidTools.py +++ b/BaseTools/Source/Python/FMMT/core/GuidTools.py @@ -15,8 +15,9 @@ from FirmwareStorageFormat.Common import * from utils.FmmtLogger import FmmtLogger as logger import subprocess -def ExecuteCommand(cmd: list) -> None: - subprocess.run(cmd,stdout=subprocess.DEVNULL) +def ExecuteCommand(cmd_list: list) -> None: + cmd = ' '.join(cmd_list) + subprocess.run(cmd, stdout=subprocess.DEVNULL, shell=True) class GUIDTool: def __init__(self, guid: str, short_name: str, command: str) -> None: @@ -176,4 +177,3 @@ class GUIDTools: raise Exception("Process Failed: is not defined!") guidtools = GUIDTools() - -- cgit v1.1