-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
We should not patch the result of execution by deleting some text because we don't know if this a real text generated by script or an artefact of ScriptRunnerContext class. To suppress the force_print
text at the and of each command execution report it is much better to do the following:
ctx.putProperty('script.runner.using.systemout', True)
I propose to add this line just after creation of context
ScriptRunnerContext ctx = new ScriptRunnerContext();
ctx.setBaseConnection(conn);
ctx.putProperty('script.runner.using.systemout', Boolean.TRUE); /// <--- here
and remove line
results = results.replaceAll(" force_print\n", "");
This change should be applied to both sqlcl/java/src/ParseScriptRunOneAtATime.java
and sqlcl/java/src/RunMyScript.java
examples.
Metadata
Metadata
Assignees
Labels
No labels