Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions internal/dependencymanager/dependencyinstaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"encoding/hex"
"fmt"
"path/filepath"
"strings"

"github.com/psiemens/sconfig"

Expand Down Expand Up @@ -585,19 +586,19 @@ func (di *DependencyInstaller) fetchDependenciesWithDepth(dependency config.Depe
}

// Log installation with visual hierarchy and branding colors
indent := ""
var indent strings.Builder
prefix := ""

if depth > 0 {
// Create indentation with proper tree characters
for i := 0; i < depth; i++ {
indent += " "
indent.WriteString(" ")
}
prefix = "├─ "

// Add depth limit warning for very deep chains
if depth >= 5 {
di.Logger.Info(fmt.Sprintf("%s⚠️ Deep dependency chain (depth %d)", indent, depth))
di.Logger.Info(fmt.Sprintf("%s⚠️ Deep dependency chain (depth %d)", indent.String(), depth))
}
}

Expand All @@ -606,7 +607,7 @@ func (di *DependencyInstaller) fetchDependenciesWithDepth(dependency config.Depe
shortAddress := "0x..." + fullAddress[len(fullAddress)-4:]
addressStyled := branding.GreenStyle.Render(shortAddress)
networkStyled := branding.GrayStyle.Render(networkName)
di.Logger.Info(fmt.Sprintf("%s%s%s @ %s (%s)", indent, prefix, contractNameStyled, addressStyled, networkStyled))
di.Logger.Info(fmt.Sprintf("%s%s%s @ %s (%s)", indent.String(), prefix, contractNameStyled, addressStyled, networkStyled))
di.installCount++

err := di.addDependency(dependency)
Expand Down
Loading