Skip to content

Compile/Upload Fails with Paths Containing Spaces #15

@10xdev4u-alt

Description

@10xdev4u-alt

Critical Bug:

Image

Problem Description:

The $sketch_file variable is passed unquoted to arduino-cli compile and arduino-cli upload commands within the aci_project/bin/aci.sh script. In shell scripting, unquoted variables with spaces undergo "word splitting," causing the command to misinterpret the single path as multiple arguments.

Impact:

  • Compilation and upload operations fail if the sketch file or any parent directory in its path includes spaces.
  • Leads to immediate frustration and a broken workflow for users in common environments.

Steps to Reproduce:

  1. Create a new directory with a space in its name (e.g., ~/Arduino Projects/).
  2. Create a new sketch inside this directory (e.g., ~/Arduino Projects/MyBlink/MyBlink.ino).
  3. Use aci_project/bin/aci.sh to select this sketch.
  4. Attempt to "Compile Code" or "Upload Code".
  5. Expected: The sketch compiles/uploads successfully.
  6. Actual: The arduino-cli command fails with errors related to file not found or invalid arguments because the path is incorrectly parsed.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions