Skip to content

Commit ebbd941

Browse files
committed
fix: correct go path for commands executed in method getFinalPackagesVersionsForModule
1 parent 1cd01c2 commit ebbd941

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/main/java/io/github/guacsec/trustifyda/providers/GoModulesProvider.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ private Sbom buildSbomFromGraph(
318318

319319
private Map<String, List<String>> getFinalPackagesVersionsForModule(
320320
Map<String, List<String>> edges, Path manifestPath) {
321-
Operations.runProcessGetOutput(manifestPath.getParent(), "go", "mod", "download");
321+
Operations.runProcessGetOutput(manifestPath.getParent(), goExecutable, "mod", "download");
322322
String finalVersionsForAllModules =
323-
Operations.runProcessGetOutput(manifestPath.getParent(), "go", "list", "-m", "all");
323+
Operations.runProcessGetOutput(manifestPath.getParent(), goExecutable, "list", "-m", "all");
324324
Map<String, String> finalModulesVersions =
325325
Arrays.stream(finalVersionsForAllModules.split(Operations.GENERIC_LINE_SEPARATOR))
326326
.filter(string -> string.trim().split(" ").length == 2)
@@ -395,8 +395,7 @@ private static boolean isGoToolchainEntry(String dependency) {
395395
}
396396

397397
private String buildGoModulesDependencies(Path manifestPath) {
398-
String[] goModulesDeps;
399-
goModulesDeps = new String[] {goExecutable, "mod", "graph"};
398+
String[] goModulesDeps = new String[] {goExecutable, "mod", "graph"};
400399

401400
// execute the clean command
402401
String goModulesOutput =

0 commit comments

Comments
 (0)