diff options
author | Jason1 Lin <jason1.lin@intel.com> | 2025-03-16 03:05:58 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-03-26 05:37:32 +0000 |
commit | a7ab45ace25c4b987994158687d04de07ed20a96 (patch) | |
tree | 473b051399028d66fec2c0ff4d28abe43446d9ff /BaseTools/Source | |
parent | 95bf74fac1977a083234518933393939145160fc (diff) | |
download | edk2-a7ab45ace25c4b987994158687d04de07ed20a96.zip edk2-a7ab45ace25c4b987994158687d04de07ed20a96.tar.gz edk2-a7ab45ace25c4b987994158687d04de07ed20a96.tar.bz2 |
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 <jason1.lin@intel.com>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/Python/FMMT/core/GuidTools.py | 6 |
1 files changed, 3 insertions, 3 deletions
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()
-
|