🔨 Fix path handling for generic variant (#27528)

This commit is contained in:
Scott Lahteine 2024-11-12 17:44:34 -06:00 committed by GitHub
parent aa80cb0620
commit 1df97254cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,6 +51,8 @@ if pioutil.is_pio_build():
# 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));