This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-36) Fix NPE when puppet version unset in cfg on disk
Prior to this commit, if a config value is being set (e.g.` prm set backend`), but the Puppet version is still unset and using the viper default value, when the config is being written, viper still sees an empty `semver.Version` as a non-empty value and writes it to config as: ```yaml puppetversion: {} ``` This causes an NPE when the `.String()` method is called on `prm.RunningConfig.PuppetVersion`. This commit adds a check when we load the puppet ver config value from Viper and assigns the default puppet version if the string returned is empty.
- Loading branch information