Skip to content

Commit b290fe6

Browse files
dgarnierTracy Spiva
authored and
Tracy Spiva
committed
🔨 Fix config.ini URL fetch (MarlinFirmware#25313)
1 parent ea97d09 commit b290fe6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

buildroot/share/PlatformIO/scripts/configuration.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,12 @@ def apply_opt(name, val, conf=None):
8585
# Return True if any files were fetched.
8686
def fetch_example(url):
8787
if url.endswith("/"): url = url[:-1]
88-
if url.startswith('http'):
89-
url = url.replace("%", "%25").replace(" ", "%20")
90-
else:
88+
if not url.startswith('http'):
9189
brch = "bugfix-2.1.x"
92-
if '@' in path: path, brch = map(str.strip, path.split('@'))
90+
if '@' in url: url, brch = map(str.strip, url.split('@'))
9391
url = f"https://raw.githubusercontent.com/MarlinFirmware/Configurations/{brch}/config/{url}"
94-
92+
url = url.replace("%", "%25").replace(" ", "%20")
93+
9594
# Find a suitable fetch command
9695
if shutil.which("curl") is not None:
9796
fetch = "curl -L -s -S -f -o"

0 commit comments

Comments
 (0)