You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/05/04 10:41:37 UTC

[37/50] [abbrv] incubator-tinkerpop git commit: Added default args bindings when passing a script to the console.

Added default args bindings when passing a script to the console.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1e83a321
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1e83a321
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1e83a321

Branch: refs/heads/TINKERPOP-946
Commit: 1e83a3212f97dfe4ab3c601814a47028885c6e63
Parents: cd709ec
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon May 2 12:43:45 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon May 2 12:43:45 2016 -0400

----------------------------------------------------------------------
 .../groovy/org/apache/tinkerpop/gremlin/console/Console.groovy     | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1e83a321/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 7ab8b57..564df32 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -322,6 +322,8 @@ class Console {
             if (scriptAndArgs.size() > 1) {
                 List<String> args = scriptAndArgs.subList(1, scriptAndArgs.size())
                 groovy.execute("args = [\"" + args.join('\",\"') + "\"]")
+            } else {
+                groovy.execute("args = []")
             }
 
             final File file = new File(scriptFile)