Skip to content

Commit

Permalink
Merge pull request #25 from MichaelEischer/do-not-set-empty-hostname
Browse files Browse the repository at this point in the history
Restore old behavior of not setting empty hostnames
  • Loading branch information
jepio authored Jan 15, 2024
2 parents 47bc4cf + 47d54a3 commit 846cbf9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions initialize/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ type CloudConfigUnit interface {
}

func ApplyHostname(hostname string) error {
if hostname == "" {
return nil
}
if err := system.SetHostname(hostname); err != nil {
return fmt.Errorf("error setting hostname: %w", err)
}
Expand Down

0 comments on commit 846cbf9

Please sign in to comment.