Skip to content

Commit 07181de

Browse files
Error when passing --verbose without --verify or --upload
Since the handling of these options defaults to non-verbose (instead of the current preference), they make no sense when starting the IDE normally. Previously, these options would just be ignored in this case, now an error is shown.
1 parent 34f5930 commit 07181de

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

app/src/processing/app/Base.java

+3
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ public Base(String[] args) throws Exception {
401401
if ((action == ACTION.UPLOAD || action == ACTION.VERIFY) && filenames.size() != 1)
402402
showError(null, _("Must specify exactly one sketch file"), 3);
403403

404+
if ((action != ACTION.UPLOAD && action != ACTION.VERIFY) && (doVerboseBuild || doVerboseUpload))
405+
showError(null, _("--verbose, --verbose-upload and --verbose-build can only be used together with --verify or --upload"), 3);
406+
404407
for (String path: filenames) {
405408
// Fix a problem with systems that use a non-ASCII languages. Paths are
406409
// being passed in with 8.3 syntax, which makes the sketch loader code

build/shared/manpage.adoc

+12
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,28 @@ OPTIONS
9595
verbose mode during build is disabled regardless of the current
9696
preferences.
9797

98+
{empty}::
99+
This option is only valid together with *--verify* or
100+
*--upload*.
101+
98102
*--verbose-upload*::
99103
Enable verbose mode during upload. If this option is not given,
100104
verbose mode during upload is disabled regardless of the current
101105
preferences.
102106

107+
{empty}::
108+
This option is only valid together with *--verify* or
109+
*--upload*.
110+
103111
*-v, --verbose*::
104112
Enable verbose mode during build and upload.
105113
This option has the same effect of using both *--verbose-build*
106114
and *--verbose-upload*.
107115

116+
{empty}::
117+
This option is only valid together with *--verify* or
118+
*--upload*.
119+
108120
*--preferences-file* __filename__::
109121
Read and store preferences from the specified __filename__ instead
110122
of the default one.

0 commit comments

Comments
 (0)