Skip to content

Commit 8695cfa

Browse files
authored
Merge pull request #328 from covexo/fix-nil-pointers-in-get-and-loadingtext
Fixed two nil pointers
2 parents 1e3869d + 5c3f42e commit 8695cfa

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/devspace/config/configutil/get.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ func SetDefaultsOnce() {
169169
}
170170

171171
if config.InternalRegistry != nil {
172-
defaultConfig.InternalRegistry.Namespace = &defaultNamespace
172+
defaultConfig.InternalRegistry = &v1.InternalRegistryConfig{
173+
Namespace: &defaultNamespace,
174+
}
173175
config.InternalRegistry.Namespace = &defaultNamespace
174176
}
175177
})

pkg/util/log/loading_text.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func (l *loadingText) render() {
8888
prefixLength := len(messagePrefix)
8989
suffixLength := len(messageSuffix)
9090

91-
if uint16(prefixLength+len(message)+suffixLength) > terminalSize.Width {
91+
if terminalSize != nil && uint16(prefixLength+len(message)+suffixLength) > terminalSize.Width {
9292
dots := []byte("...")
9393
maxMessageLength := terminalSize.Width - uint16(prefixLength+suffixLength+len(dots))
9494

0 commit comments

Comments
 (0)