Skip to content

Viper writes wrong config after Set() #2110

@vipyxc-byte

Description

@vipyxc-byte

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.
  • I have checked the troubleshooting guide for my problem, without success.

Viper Version

1.21.0

Go Version

1.23

Config Source

Manual set

Format

YAML, Other (specify below)

Repl.it link

#717

Code reproducing the issue

In Apollo configuration, I have the following settings:
security.app.key = 123
security.app.key.version = 3

Expected Behavior

normal

Actual Behavior

However, after setting values using viper.Set, part of the configuration gets lost.

Steps To Reproduce

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions