Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recipe execute fail if there is a space character in windows user name #4397

Closed
williamlai opened this issue Jan 7, 2016 · 4 comments
Closed
Assignees
Labels
Component: Compilation Related to compilation of Arduino sketches Component: IDE The Arduino IDE Type: Bug Type: Duplicate Another item already exists for this topic

Comments

@williamlai
Copy link

In platform.txt I add recipe for building my own image:

recipe.objcopy.hex.cmd=my_img.bat
recipe.objcopy.hex.pattern="{runtime.tools.mytool.path}/{recipe.objcopy.hex.cmd}" "{build.path}\application.axf"

In a user name "foo bar" under windows, the whole command line like this when verbose enabled:

"C:\Users\foo bar\AppData\Local\Arduino15\packages\arduino\tools\mytool\1.0.2\my_img.bat" "C:\Users\foo bar\AppData\Local\Temp\buildfc17b6afbe0bd59b0e46992e10640eb5.tmp\application.axf"

And it execute fail with message:

'C:\Users\foo' is not internal or external command

So I trace source code of arduino-core, and find this code is specious in method exec() in Compiler.java

CommandLine commandLine = new DoubleQuotedArgumentsOnWindowsCommandLine(command[0]);

The class DoubleQuotedArgumentsOnWindowsCommandLine is not actually "double quoted" command[0]. It only passes the argument to super class CommandLine and the constructor of CommandLine also not adds double quotes. So the actually command executed is

C:\Users\foo bar\AppData\Local\Arduino15\packages\arduino\tools\mytool\1.0.2\my_img.bat "C:\Users\foo bar\AppData\Local\Temp\buildfc17b6afbe0bd59b0e46992e10640eb5.tmp\application.axf"

So it seems it needs add double quoted somewhere in the compile process.

@cmaglie cmaglie added Component: IDE The Arduino IDE Type: Bug Component: Compilation Related to compilation of Arduino sketches labels Jan 12, 2016
@benlye
Copy link

benlye commented Mar 15, 2019

I'm still running into this issue in current v1.8.x versions of the IDE. Is there any chance of it getting addressed?

@1TechSupport1
Copy link

The issue still persists, hoping they would fix it :/

@cfdeangelis
Copy link

cfdeangelis commented Dec 6, 2022

This issue seems to be persisting in 2.0.3, kind of ridiculous in 2022

@per1234
Copy link
Collaborator

per1234 commented Dec 6, 2022

Now tracked at arduino/arduino-cli#958

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2022
@per1234 per1234 added the Type: Duplicate Another item already exists for this topic label Dec 6, 2022
@per1234 per1234 self-assigned this Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Compilation Related to compilation of Arduino sketches Component: IDE The Arduino IDE Type: Bug Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

6 participants