-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
Component: CLIThe Arduino IDE's command line interfaceThe Arduino IDE's command line interface
Description
When calling arduino with a sketch in a non-existent folder I get java.lang.MullPointerException
:
$ arduino --verify --board arduino:avr:mega bad/nonexist.ino
Picked up JAVA_TOOL_OPTIONS:
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
java.lang.NullPointerException
at processing.app.helpers.FileUtils.listFiles(FileUtils.java:348)
at processing.app.Sketch.listSketchFiles(Sketch.java:108)
at processing.app.Sketch.<init>(Sketch.java:54)
at processing.app.Base.<init>(Base.java:410)
at processing.app.Base.main(Base.java:151)
For comparison, when the folder exists but the file doesn't, I get a more informative error message:
$ arduino --verify --board arduino:avr:mega test/nonexist.ino
Picked up JAVA_TOOL_OPTIONS:
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
java.io.IOException: No valid code files found
at processing.app.Sketch.listSketchFiles(Sketch.java:117)
at processing.app.Sketch.<init>(Sketch.java:54)
at processing.app.Base.<init>(Base.java:410)
at processing.app.Base.main(Base.java:151)
I think the error message should be consistent with IOException.
Using Arduino 1.8.8 on Ubuntu 18.04.
Metadata
Metadata
Assignees
Labels
Component: CLIThe Arduino IDE's command line interfaceThe Arduino IDE's command line interface