Skip to content

Commit 414b1ab

Browse files
committed
fix
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent f05fc9a commit 414b1ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

config/config.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const (
4545
DEFAULT = "default"
4646
)
4747

48-
var NonEmptyConfigKeys = map[string]bool{
48+
var nonEmptyConfigKeys = map[string]bool{
4949
"output": true,
5050
"timeout": true,
5151
"profile": true,
@@ -354,6 +354,10 @@ func (c *Config) LoadProfile(name string) {
354354

355355
// UpdateConfig updates and saves config
356356
func (c *Config) UpdateConfig(key string, value string, update bool) {
357+
if nonEmptyConfigKeys[key] && value == "" {
358+
fmt.Printf("Error: value for '%s' must not be empty\n", key)
359+
return
360+
}
357361
switch key {
358362
case "prompt":
359363
c.Core.Prompt = value

0 commit comments

Comments
 (0)