Skip to content

Commit

Permalink
Allow py scripts to handle spaces in paths (MarlinFirmware#14876)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored Aug 8, 2019
1 parent eb3a3d2 commit f9f20bb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion buildroot/share/PlatformIO/scripts/alfawise_Ux0.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ def encrypt(source, target, env):
finally:
firmware.close()
marlin_alfa.close()
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);
env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
4 changes: 2 additions & 2 deletions buildroot/share/PlatformIO/scripts/fysetc_STM32F1.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"$OBJCOPY",
"-O",
"ihex",
"$BUILD_DIR/${PROGNAME}.elf",
"$BUILD_DIR/${PROGNAME}.hex"
'"$BUILD_DIR/${PROGNAME}.elf"',
'"$BUILD_DIR/${PROGNAME}.hex"'
]), "Building $TARGET"))

# please keep $SOURCE variable, it will be replaced with a path to firmware
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def addboot(source,target,env):
os.rename(target[0].path, firmware_without_bootloader_dir)
#os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin')

env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", addboot);
env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', addboot);

2 changes: 1 addition & 1 deletion buildroot/share/PlatformIO/scripts/mks_robin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def encrypt(source, target, env):
finally:
firmware.close()
robin.close()
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);
env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
2 changes: 1 addition & 1 deletion buildroot/share/PlatformIO/scripts/mks_robin_lite.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def encrypt(source, target, env):
finally:
firmware.close()
robin.close()
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);
env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
2 changes: 1 addition & 1 deletion buildroot/share/PlatformIO/scripts/mks_robin_mini.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def encrypt(source, target, env):
finally:
firmware.close()
robin.close()
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);
env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);
2 changes: 1 addition & 1 deletion buildroot/share/PlatformIO/scripts/mks_robin_nano.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ def encrypt(source, target, env):
finally:
firmware.close()
robin.close()
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt);
env.AddPostAction('"$BUILD_DIR/${PROGNAME}.bin"', encrypt);

0 comments on commit f9f20bb

Please sign in to comment.