Merge branch 'master' into 'master'

fix: Allow migrations with a minimal config

See merge request les/gancio!50
This commit is contained in:
les 2024-07-08 11:08:16 +00:00
commit e5946a518a

View file

@ -39,7 +39,7 @@ let config = {
const configContent = fs.readFileSync(config_path)
config = Object.assign(config, JSON.parse(configContent))
config.status = 'CONFIGURED'
if (!config.hostname) {
if (!config.hostname && config.baseurl) {
config.hostname = new URL.URL(config.baseurl).hostname
}
} else {
@ -50,4 +50,4 @@ let config = {
}
config.load()
module.exports = config
module.exports = config