Skip to content

Commit 9a40119

Browse files
authored
[console] fix line splitting in --runBefore (#5700)
before ./joern --runBefore '//> using dep org.apache.commons:commons-exec:1.5.0 //> using dep io.methvin:directory-watcher:0.19.1' would fail because the version number for commons-exec would not end at "1.5.0", but instead also include the whole second line.
1 parent a81cb0b commit 9a40119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

console/src/main/scala/io/joern/console/BridgeBase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ trait BridgeBase extends InteractiveShell with ScriptExecution with PluginHandli
7979
.valueName("'import Int.MaxValue'")
8080
.unbounded()
8181
.optional()
82-
.action((x, c) => c.copy(runBefore = c.runBefore :+ x))
82+
.action((x, c) => c.copy(runBefore = c.runBefore ++ x.linesIterator.toIndexedSeq))
8383
.text("given code will be executed on startup - this may be passed multiple times")
8484

8585
opt[String]("runAfter")

0 commit comments

Comments
 (0)