Skip to content

Commit 2e7ac5e

Browse files
dgarnierernisv
authored andcommitted
🔨 Fix config.ini URL fetch (MarlinFirmware#25313)
1 parent 58a0f5d commit 2e7ac5e

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)