Skip to content

Commit

Permalink
fix: stacks listed twice
Browse files Browse the repository at this point in the history
  • Loading branch information
i4ki committed Jan 10, 2022
1 parent 92d3679 commit d5acd04
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"github.com/mineiros-io/terramate/git"
"github.com/mineiros-io/terramate/hcl"
"github.com/mineiros-io/terramate/project"
"github.com/mineiros-io/terramate/stack"
"github.com/rs/zerolog/log"
)
Expand Down Expand Up @@ -87,6 +88,10 @@ func (m *Manager) ListChanged() ([]Entry, error) {
Msg("Get dir name.")
dirname := filepath.Dir(filepath.Join(m.root, path))

if _, ok := stackSet[project.RelPath(m.root, dirname)]; ok {
continue
}

logger.Debug().
Str("path", dirname).
Msg("Try load changed.")
Expand All @@ -109,7 +114,7 @@ func (m *Manager) ListChanged() ([]Entry, error) {
}
}

stackSet[dirname] = Entry{
stackSet[s.Dir] = Entry{
Stack: s,
Reason: "stack has unmerged changes",
}
Expand Down

0 comments on commit d5acd04

Please sign in to comment.