Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mpollmeier committed Sep 26, 2024
1 parent 96658b3 commit 3be8bea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ object PhpParser {
}

private def defaultPhpParserBin: String = {
val packagePath = Paths.get(this.getClass.getProtectionDomain.getCodeSource.getLocation.toURI).toAbsolutePath.toString
val packagePath =
Paths.get(this.getClass.getProtectionDomain.getCodeSource.getLocation.toURI).toAbsolutePath.toString
ExternalCommand
.executableDir(packagePath)
.resolve("php-parser/php-parser.php")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ trait ExternalCommand {

object ExternalCommand extends ExternalCommand {

/** Finds the absolute path to the executable directory (e.g. `/path/to/javasrc2cpg/bin`).
* Based on the package path of a loaded classfile based on some (potentially flakey?) filename heuristics.
* Context: we want to be able to invoke the x2cpg frontends from any directory, not just their install directory,
* and then invoke other executables, like astgen, php-parser et al.
* */
/** Finds the absolute path to the executable directory (e.g. `/path/to/javasrc2cpg/bin`). Based on the package path
* of a loaded classfile based on some (potentially flakey?) filename heuristics. Context: we want to be able to
* invoke the x2cpg frontends from any directory, not just their install directory, and then invoke other
* executables, like astgen, php-parser et al.
*/
def executableDir(packagePath: String): Path = {
val dir = packagePath
val indexOfLib = dir.lastIndexOf("lib")
Expand Down

0 comments on commit 3be8bea

Please sign in to comment.