From 7db66eef5bdf6e3148a649a16284bb669bbdf50e Mon Sep 17 00:00:00 2001 From: Branden Ghena Date: Thu, 12 Jan 2023 18:09:48 -0600 Subject: [PATCH] Quote path arguments to nrfjprog nrfjprog doesn't like spaces in file paths, which makes actions like "burn bootloader" fail if you're on windows and have a space in your username. Quoting the argument fixes this. --- builder/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/main.py b/builder/main.py index e72ff35..b1b832c 100644 --- a/builder/main.py +++ b/builder/main.py @@ -241,7 +241,7 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 None, [ env.VerboseAction( - "nrfjprog --program $DFUBOOTHEX -f nrf52 --chiperase", + "nrfjprog --program \"$DFUBOOTHEX\" -f nrf52 --chiperase", "Uploading $DFUBOOTHEX", ), env.VerboseAction( @@ -314,7 +314,7 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 "--sectorerase" if "DFUBOOTHEX" in env else "--chiperase", "--reset" ], - UPLOADCMD="$UPLOADER $UPLOADERFLAGS --program $SOURCE" + UPLOADCMD="$UPLOADER $UPLOADERFLAGS --program \"$SOURCE\"" ) upload_actions = [env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")]