Skip to content

Commit 007ccd1

Browse files
authored
Merge pull request #228 from rocajuanma/fix-output-alignment
fix[init]: aligment and output improvements
2 parents ada9c5b + ce6e461 commit 007ccd1

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

cmd/initcmd/init.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,35 +102,39 @@ func runInitCommand() error {
102102

103103
// Provide specific guidance if there are configuration warnings
104104
if len(warnings) > 0 {
105-
o.PrintInfo("\nRecommended next steps to complete your setup:")
105+
fmt.Println("")
106+
o.PrintInfo("Recommended next steps to complete your setup:")
106107
for _, warning := range warnings {
107108
o.PrintInfo(" • %s", warning)
108109
}
109-
o.PrintInfo("\nThese steps are optional but recommended for the best experience.")
110+
fmt.Println("")
111+
o.PrintInfo("These steps are optional but recommended for the best experience.")
110112
}
111113

112114
// Final usage guidance
113-
o.PrintInfo("\nYou can now use:")
115+
fmt.Println("")
116+
o.PrintInfo("You can now use:")
114117
o.PrintInfo(" • 'anvil install [group]' to install development tool groups")
115118
o.PrintInfo(" • 'anvil install [app]' to install any individual application")
116119
o.PrintInfo(" • Edit %s/%s to customize your configuration", config.GetAnvilConfigDirectory(), constants.ANVIL_CONFIG_FILE)
117120

118121
// GitHub configuration warning
119-
o.PrintWarning("\n⚙️ Configuration Management Setup Required:")
120-
o.PrintInfo(" • Edit the 'github.config_repo' field in settings.yaml to enable config pull/push")
122+
o.PrintWarning("Configuration Management Setup Required:")
123+
o.PrintInfo(" • Edit the 'github.config_repo' field in %s to enable config pull/push", constants.ANVIL_CONFIG_FILE)
121124
o.PrintInfo(" • Example: 'github.config_repo: username/dotfiles'")
122125
o.PrintInfo(" • Set GITHUB_TOKEN environment variable for authentication")
123-
o.PrintInfo(" • Run 'anvil config pull' once configured to sync your dotfiles")
126+
o.PrintInfo(" • Run 'anvil doctor' once added to validate configuration")
124127

125128
// Show available groups dynamically
126129
if groups, err := config.GetAvailableGroups(); err == nil {
127130
builtInGroups := config.GetBuiltInGroups()
128-
o.PrintInfo("\nAvailable groups: %s", strings.Join(builtInGroups, ", "))
131+
fmt.Println("")
132+
o.PrintInfo("Available groups: %s", strings.Join(builtInGroups, ", "))
129133
if len(groups) > len(builtInGroups) {
130134
o.PrintInfo("Custom groups: %d defined", len(groups)-len(builtInGroups))
131135
}
132136
} else {
133-
o.PrintInfo("\nAvailable groups: dev, essentials")
137+
o.PrintInfo("Available groups: dev, essentials")
134138
}
135139
o.PrintInfo("Example: 'anvil install dev' or 'anvil install firefox'")
136140

0 commit comments

Comments
 (0)