Set config file when provided (#4909)

This commit is contained in:
WithoutPants 2024-06-03 12:44:15 +10:00 committed by GitHub
parent b3f8839ef7
commit b232e58b06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -158,6 +158,7 @@ func (i *Config) initConfig() error {
// if file does not exist, assume it is a new system
if exists, _ := fsutil.FileExists(configFile); !exists {
i.isNewSystem = true
i.SetConfigFile(configFile)
// ensure we can write to the file
if err := fsutil.Touch(configFile); err != nil {