From 1df97254cb1a6f6e3cd7fdbfad8f925452c80bb3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 12 Nov 2024 17:44:34 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20path=20handling=20for=20ge?= =?UTF-8?q?neric=20variant=20(#27528)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/PlatformIO/scripts/generic_create_variant.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/generic_create_variant.py b/buildroot/share/PlatformIO/scripts/generic_create_variant.py index 60c36c7f243b..cfab812e1503 100644 --- a/buildroot/share/PlatformIO/scripts/generic_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -51,6 +51,8 @@ # Make sure the local variant sub-folder exists if marlin_variant_pattern.match(str(variant).lower()): - source_dir = Path("buildroot/share/PlatformIO/variants", variant) + here = Path.cwd() + variants_dir = here / 'buildroot' / 'share' / 'PlatformIO' / 'variants' + source_dir = variants_dir / variant assert source_dir.is_dir() - board.update("build.variants_dir", "buildroot/share/PlatformIO/variants"); + board.update("build.variants_dir", str(variants_dir));