From 1a2b5c94f62ca61d58d38071fb76a7c334ddf1ad Mon Sep 17 00:00:00 2001 From: Karan Batavia <118820668+karan-batavia@users.noreply.github.com> Date: Wed, 3 Apr 2024 03:31:04 +0530 Subject: [PATCH] [C#] fix dotnetastgen runner to handle space containing paths (#4419) --- joern-cli/frontends/csharpsrc2cpg/build.sbt | 2 +- .../frontends/csharpsrc2cpg/src/main/resources/application.conf | 2 +- .../scala/io/joern/csharpsrc2cpg/utils/DotNetAstGenRunner.scala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/joern-cli/frontends/csharpsrc2cpg/build.sbt b/joern-cli/frontends/csharpsrc2cpg/build.sbt index 793ecdcb9d0f..86254afb1ee1 100644 --- a/joern-cli/frontends/csharpsrc2cpg/build.sbt +++ b/joern-cli/frontends/csharpsrc2cpg/build.sbt @@ -34,7 +34,7 @@ enablePlugins(JavaAppPackaging, LauncherJarPlugin) lazy val AstgenWin = "dotnetastgen-win.exe" lazy val AstgenLinux = "dotnetastgen-linux" -lazy val AstgenLinuxArm = "dotnetastgen-linux-arm" +lazy val AstgenLinuxArm = "dotnetastgen-linux-arm64" lazy val AstgenMac = "dotnetastgen-macos" lazy val AllPlatforms = Seq(AstgenWin, AstgenLinux, AstgenLinuxArm, AstgenMac) diff --git a/joern-cli/frontends/csharpsrc2cpg/src/main/resources/application.conf b/joern-cli/frontends/csharpsrc2cpg/src/main/resources/application.conf index c0611d3e9557..f9f979f2f3be 100644 --- a/joern-cli/frontends/csharpsrc2cpg/src/main/resources/application.conf +++ b/joern-cli/frontends/csharpsrc2cpg/src/main/resources/application.conf @@ -1,3 +1,3 @@ csharpsrc2cpg { - dotnetastgen_version: "0.29.0" + dotnetastgen_version: "0.34.0" } diff --git a/joern-cli/frontends/csharpsrc2cpg/src/main/scala/io/joern/csharpsrc2cpg/utils/DotNetAstGenRunner.scala b/joern-cli/frontends/csharpsrc2cpg/src/main/scala/io/joern/csharpsrc2cpg/utils/DotNetAstGenRunner.scala index 771525f5b166..776a22f5f334 100644 --- a/joern-cli/frontends/csharpsrc2cpg/src/main/scala/io/joern/csharpsrc2cpg/utils/DotNetAstGenRunner.scala +++ b/joern-cli/frontends/csharpsrc2cpg/src/main/scala/io/joern/csharpsrc2cpg/utils/DotNetAstGenRunner.scala @@ -64,7 +64,7 @@ class DotNetAstGenRunner(config: Config) extends AstGenRunnerBase(config) { metaData: AstGenProgramMetaData ): Try[Seq[String]] = { val excludeCommand = if (exclude.isEmpty) "" else s"-e \"$exclude\"" - ExternalCommand.run(s"$astGenCommand -o ${out.toString()} -i $in $excludeCommand", ".") + ExternalCommand.run(s"$astGenCommand -o ${out.toString()} -i \"$in\" $excludeCommand", ".") } }