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

Windows NetBeans build fails if there's a space in the path to platformio.exe #4096

Closed
1 task done
RussellAult opened this issue Nov 3, 2021 · 2 comments
Closed
1 task done
Assignees
Milestone

Comments

@RussellAult
Copy link

  • PlatformIO Core

Configuration

Operating system: Windows 10 21H1 Pro

PlatformIO Version (platformio --version): 5.2.2

Description of problem

The <buildCommand> and <cleanCommand> in .\nbproject\configurations.xml don't surround the full path to the platformio.exe executable with "s, which causes the commands to fail if there's a space in the path (since everything after the space is interpreted as an argument)

Steps to Reproduce

  1. Install PlatformIO Core on Windows using get-platformio.py for a user whose username has a space in it
  2. Create a new folder and run pio project init --ide netbeans --board uno
  3. Open the project in NetBeans
  4. Add some code
  5. Run the "Build" command

Expected Results

The project should build

Actual Results

Cannot run program "C:/Users/Firstname" (in directory "C:\Users\Firstname Lastname\Documents\project"): CreateProcess error=2, The system cannot find the file specified

Work-around

Manually editing .\nbproject\configurations.xml to add " around the full path for <buildCommand> and <cleanCommand> (i.e. <buildCommand>C:/Users/Firstname Lastname/.platformio/penv/Scripts/platformio.exe -f -c netbeans run</buildCommand> becomes <buildCommand>"C:/Users/Firstname Lastname/.platformio/penv/Scripts/platformio.exe" -f -c netbeans run</buildCommand>) allows the project to build as expected

@ivankravets ivankravets added this to the 5.2.3 milestone Nov 3, 2021
@ivankravets ivankravets modified the milestones: 5.2.3, 5.2.4 Nov 5, 2021
@valeros
Copy link
Member

valeros commented Nov 15, 2021

Thanks for reporting, fixed in the dev branch. Please upgrade your PlatformIO installation via pio upgrade --dev and try again.

@RussellAult
Copy link
Author

Thanks! Will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants