Post build hook command fails on Windows with spaces in the path #316
Labels
os: windows
Specific to Windows operating system
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
I have a board package which runs a postobjcopy hook command:
recipe.hooks.objcopy.postobjcopy.01.pattern.windows="{runtime.platform.path}/tools/win/do_version.bat" "{build.path}" "{build.project_name}" "{build.source.path}" {build.board}
If the Windows username includes a space, and the path to the sketch folder includes a space, I get an error when the hook command attempts to run.
For example:
If I move the sketch to a folder without spaces, or if the build is run from a user account without spaces the hook command runs fine.
To summarize, when running recipe hook commands, spaces are tolerated either in the sketch path or in the platform path, but not both.
I ran arduino-builder with
--debug-level=10
and put the output here:https://gist.github.com/benlye/93733a920caff6ffec6bad5a4605476d
In that example the user profile folder is
C:\Users\Test User\
and the sketch path isC:\Temp\foo bar\Multiprotocol
.Maybe the command line escaping is misfiring somewhere?
There is a very old issue logged against the Arduino IDE, but it seems like the problem is really in arduino-builder.
The text was updated successfully, but these errors were encountered: