From c7b7e395bf357f3c7203b6e6fb2e1fa1bfa55e63 Mon Sep 17 00:00:00 2001 From: Axel Nana Date: Sat, 26 Oct 2024 22:39:52 +0100 Subject: [PATCH] fix(scripts): Normalize flatc path on Windows. --- scripts/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/common.py b/scripts/common.py index 482277bc..84fbad80 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -134,6 +134,12 @@ def __init__(self, argv, script_name: str, script_version: str): print_help(no_logo, script_name) sys.exit(1) + # Check if running on Windows + if sys.platform.startswith('win'): + self.flatc_path = self.flatc_path.replace('/', '\\') + if not self.flatc_path.endswith(".exe"): + self.flatc_path += ".exe" + def run_subprocess(argv): """