Skip to content

Commit

Permalink
fix(engine/config): no float on configuration file (#4792)
Browse files Browse the repository at this point in the history
Signed-off-by: Yvonnick Esnault <yvonnick.esnault@corp.ovh.com>
  • Loading branch information
yesnault authored and fsamin committed Dec 5, 2019
1 parent 9dd97d6 commit d4dfa1b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions engine/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,9 @@ var configEditCmd = &cobra.Command{
if len(t) != 2 {
sdk.Exit("Invalid key=value: %v", vk)
}
// check if value is bool, float, int or else string
// check if value is bool, int or else string
if v, err := strconv.ParseBool(t[1]); err == nil {
tomlConf.Set(t[0], "", false, v)
} else if v, err := strconv.ParseFloat(t[1], 10); err == nil {
tomlConf.Set(t[0], "", false, v)
} else if v, err := strconv.ParseInt(t[1], 10, 64); err == nil {
tomlConf.Set(t[0], "", false, v)
} else {
Expand Down

0 comments on commit d4dfa1b

Please sign in to comment.