fix(config): should return defaultConfig when config file doesnt exist (#174)

This commit is contained in:
Aveline 2025-02-19 10:27:24 +01:00 committed by GitHub
commit b38f899c84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,5 @@
VERSION_DEV := 0.3.5-dev$(shell date +%Y%m%d%H%M) VERSION_DEV := 0.3.7-dev$(shell date +%Y%m%d%H%M)
VERSION := 0.3.4 VERSION := 0.3.6
hash_resource: hash_resource:
@shasum -a 256 resource/jetkvm_native | cut -d ' ' -f 1 > resource/jetkvm_native.sha256 @shasum -a 256 resource/jetkvm_native | cut -d ' ' -f 1 > resource/jetkvm_native.sha256

View File

@ -55,6 +55,9 @@ func LoadConfig() {
return return
} }
// load the default config
config = defaultConfig
file, err := os.Open(configPath) file, err := os.Open(configPath)
if err != nil { if err != nil {
logger.Debug("default config file doesn't exist, using default") logger.Debug("default config file doesn't exist, using default")