Use sys.executable to refer to python. (#4402)

Thanks to @mrekin for testing the build on Windows.
The previous fix for this UF2 call did not work.
sys.executable should fix it.
This commit is contained in:
Tom Fifield 2024-08-06 19:48:05 +08:00 committed by GitHub
parent 4a79a690db
commit 06eaf2ba5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,7 +81,7 @@ if platform.name == "espressif32":
if platform.name == "nordicnrf52":
env.AddPostAction("$BUILD_DIR/${PROGNAME}.hex",
env.VerboseAction(f"python3 ./bin/uf2conv.py $BUILD_DIR/firmware.hex -c -f 0xADA52840 -o $BUILD_DIR/firmware.uf2",
env.VerboseAction(f"{sys.executable} ./bin/uf2conv.py $BUILD_DIR/firmware.hex -c -f 0xADA52840 -o $BUILD_DIR/firmware.uf2",
"Generating UF2 file"))
Import("projenv")