Error message for use of publish without publish socket path
This commit is contained in:
parent
064d2f0341
commit
c65d978114
|
@ -2,6 +2,7 @@ package pomo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
@ -118,5 +119,9 @@ func LoadConfig(configPath string, config *Config) error {
|
||||||
if config.IconPath == "" {
|
if config.IconPath == "" {
|
||||||
config.IconPath = path.Join(config.BasePath, "/icon.png")
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue