Skip to content

Commit ea4748f

Browse files
committed
Deprecate the "--class" CLI flag
The "--run" support has been generalized now, such that continuing to support this specialization is more trouble than it is worth.
1 parent b02aee7 commit ea4748f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/java/org/scijava/command/console/RunArgument.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,9 @@
4444
import org.scijava.plugin.Plugin;
4545

4646
/**
47-
* Handles the {@code --run} command line argument.
48-
*
49-
* @author Curtis Rueden
50-
* @author Johannes Schindelin
51-
* @author Mark Hiner
47+
* @deprecated Use {@link org.scijava.run.console.RunArgument} instead.
5248
*/
49+
@Deprecated
5350
@Plugin(type = ConsoleArgument.class)
5451
public class RunArgument extends AbstractConsoleArgument {
5552

@@ -62,7 +59,7 @@ public class RunArgument extends AbstractConsoleArgument {
6259
// -- Constructor --
6360

6461
public RunArgument() {
65-
super(2, "--run", "--class");
62+
super(2, "--class");
6663
}
6764

6865
// -- ConsoleArgument methods --
@@ -72,7 +69,10 @@ public void handle(final LinkedList<String> args) {
7269
if (!supports(args))
7370
return;
7471

75-
args.removeFirst(); // --run
72+
log.warn("The --class flag is deprecated, and will\n" +
73+
"be removed in a future release. Use --run instead.");
74+
75+
args.removeFirst(); // --class
7676
final String commandToRun = args.removeFirst();
7777
final String paramString = ConsoleUtils.hasParam(args) ? args.removeFirst() : "";
7878

0 commit comments

Comments
 (0)