fix(go-mod): Made the list command modifiable.
@@ -3,6 +3,7 @@ package com.synopsys.integration.detectable.detectables.go.gomod;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.LinkedList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -58,7 +59,7 @@ public class GoModCommandExecutor {
List<String> generateGoModWhyOutput(File directory, ExecutableTarget goExe, boolean vendorResults) throws ExecutableFailedException {
// executing this command helps produce more accurate results. Parse the output to create a module exclusion list.
- List<String> commands = Arrays.asList("mod", "why", "-m");
+ List<String> commands = new LinkedList<>(Arrays.asList("mod", "why", "-m"));
if (vendorResults) {
commands.add("-vendor");
}
