From 435c6345cd48994fe93c4163836bf298743a3247 Mon Sep 17 00:00:00 2001 From: Kasey Date: Thu, 12 Apr 2018 10:30:58 -0400 Subject: [PATCH] fix(config): `qri config set` on an int field does not actually update --- cmd/cmd_test.go | 1 + config/config.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cmd/cmd_test.go b/cmd/cmd_test.go index 8ac313fdf..82bc9bc35 100644 --- a/cmd/cmd_test.go +++ b/cmd/cmd_test.go @@ -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"}, diff --git a/config/config.go b/config/config.go index bc9735427..e114acaeb 100644 --- a/config/config.go +++ b/config/config.go @@ -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: