Error message for use of publish without publish socket path

master
Amiel Martin 3 years ago
parent 064d2f0341
commit c65d978114
No known key found for this signature in database
GPG Key ID: EBD5DF39BDE06E84

@ -2,6 +2,7 @@ package pomo
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path"
@ -118,5 +119,9 @@ func LoadConfig(configPath string, config *Config) error {
if config.IconPath == "" {
config.IconPath = path.Join(config.BasePath, "/icon.png")
}
if config.Publish && (config.PublishSocketPath == "" || config.PublishSocketPath == config.SocketPath) {
return fmt.Errorf("'publish' option now requires 'publishSocketPath' which must not be the same as 'socketPath'")
}
return nil
}

Loading…
Cancel
Save