1
0
mirror of https://github.com/nxshock/gron.git synced 2024-11-27 03:41:00 +05:00

Default config path = bin path + config name

This commit is contained in:
nxshock 2022-10-21 19:37:30 +05:00
parent 2397f32bba
commit 96587792cc
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ func initConfig() error {
return fmt.Errorf("Usage: %s [path to config]", filepath.Base(ex))
}
configFilePath := defaultConfigFilePath
configFilePath := filepath.Join(filepath.Dir(ex), defaultConfigFileName)
if len(os.Args) == 2 {
configFilePath = os.Args[1]
}

View File

@ -1,7 +1,7 @@
package main
const (
defaultConfigFilePath = "gron.conf"
defaultConfigFileName = "gron.conf"
defaultOnSuccessMessageFmt = "Job {{.JobName}} finished."
defaultOnErrorMessageFmt = "Job {{.JobName}} failed:\n\n{{.Error}}"