diff --git a/buildroot/share/PlatformIO/scripts/configuration.py b/buildroot/share/PlatformIO/scripts/configuration.py index 7a07f02d46..3fc43ed6d8 100644 --- a/buildroot/share/PlatformIO/scripts/configuration.py +++ b/buildroot/share/PlatformIO/scripts/configuration.py @@ -88,6 +88,7 @@ def fetch_example(url): if not url.startswith('http'): brch = "bugfix-2.1.x" if '@' in url: url, brch = map(str.strip, url.split('@')) + if url == 'examples/default': url = 'default' url = f"https://raw.githubusercontent.com/MarlinFirmware/Configurations/{brch}/config/{url}" url = url.replace("%", "%25").replace(" ", "%20") @@ -103,7 +104,7 @@ def fetch_example(url): import os # Reset configurations to default - os.system("git reset --hard HEAD") + os.system("git checkout HEAD Marlin/*.h") # Try to fetch the remote files gotfile = False @@ -191,7 +192,7 @@ def apply_config_ini(cp): # For 'examples/' fetch an example set from GitHub. # For https?:// do a direct fetch of the URL. - if ckey.startswith('examples/') or ckey.startswith('http:'): + if ckey.startswith('examples/') or ckey.startswith('http'): fetch_example(ckey) ckey = 'base'