Skip to content

Commit

Permalink
fix(config): qri config set on an int field does not actually update
Browse files Browse the repository at this point in the history
  • Loading branch information
ramfox committed Apr 12, 2018
1 parent dba0b14 commit 435c634
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func TestCommandsIntegration(t *testing.T) {
{"setup", "--peername=" + "alan"},
{"config", "get"},
{"config", "get", "profile"},
{"config", "set", "webapp.port", "3505"},
// TODO - add setting whole config via a file
// {"config", "set", "-i" + profileDataFilepath},
{"info", "me"},
Expand Down
2 changes: 2 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func (cfg *Config) Set(path string, value interface{}) error {
}

switch v.Kind() {
case reflect.Int:
v.SetInt(rv.Int())
case reflect.String:
v.SetString(rv.String())
case reflect.Bool:
Expand Down

0 comments on commit 435c634

Please sign in to comment.