Skip to content

Commit 3d02bc8

Browse files
committed
Deprecate the "--script" 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 ea4748f commit 3d02bc8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/org/scijava/script/console/RunScriptArgument.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@
4444
import org.scijava.script.ScriptService;
4545

4646
/**
47-
* {@link ConsoleArgument} for executing scripts directly.
48-
*
49-
* @author Mark Hiner
47+
* @deprecated Use {@link org.scijava.run.console.RunArgument} instead.
5048
*/
49+
@Deprecated
5150
@Plugin(type = ConsoleArgument.class)
5251
public class RunScriptArgument extends AbstractConsoleArgument {
5352

@@ -60,7 +59,7 @@ public class RunScriptArgument extends AbstractConsoleArgument {
6059
// -- Constructor --
6160

6261
public RunScriptArgument() {
63-
super(2, "--run", "--script");
62+
super(2, "--script");
6463
}
6564

6665
// -- ConsoleArgument methods --
@@ -70,7 +69,10 @@ public void handle(final LinkedList<String> args) {
7069
if (!supports(args))
7170
return;
7271

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

0 commit comments

Comments
 (0)