Skip to content

Conversation

@avinxshKD
Copy link

@avinxshKD avinxshKD commented Nov 18, 2025

Problem

CLI rejected sketches with custom main file names (e.g., sketch/main.pde) even though the IDE supports them via sketch.properties.

Solution

Updated CLI to check sketch.properties for a main property before falling back to default naming, matching IDE behavior from Sketch.findMain().

Changes

  • Commander.java: Added Settings import and custom main file detection logic
  • CommanderTest.java: Added unit tests for default and custom main file handling

Fixes #1219

Previously, the CLI only accepted sketches where the main .pde file
matched the sketch folder name (e.g., sketch/sketch.pde). This caused
issues when users renamed their main file in the IDE, which stores
the custom filename in sketch.properties.

Now the CLI checks sketch.properties for a 'main' property before
falling back to the default naming convention, matching the IDE's
behavior implemented in Sketch.findMain().

Fixes processing#1219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

processing cli does not support sketches with a different main.pde file

1 participant