Skip to content

Commit

Permalink
Lockfile generation fix (#41)
Browse files Browse the repository at this point in the history
* added extra output

* ignore node_modules dir
  • Loading branch information
trapacska authored Jul 28, 2017
1 parent abafec5 commit 3a85104
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ func main() {
lockfileContent := ""
lockFilePath := filepath.Join(projectRoot, "gradle_deps.lock")
if err := filepath.Walk(projectRoot, func(path string, f os.FileInfo, err error) error {
if !f.IsDir() && f.Name() == "build.gradle" {
if !f.IsDir() && f.Name() == "build.gradle" && !strings.Contains(path, "node_modules") {

gradleDepCmd := command.New(configs.GradlewPath, "-b", path, "dependencies", "-q")

if output, err := gradleDepCmd.RunAndReturnTrimmedCombinedOutput(); err != nil {
log.Warnf("Gradle task failed, error: %s", err)
log.Warnf("Gradle task failed, error: %s, output: %s", err, output)
} else {
lockfileContent += output
}
Expand Down

0 comments on commit 3a85104

Please sign in to comment.