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:
parent
2397f32bba
commit
96587792cc
@ -31,7 +31,7 @@ func initConfig() error {
|
|||||||
return fmt.Errorf("Usage: %s [path to config]", filepath.Base(ex))
|
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 {
|
if len(os.Args) == 2 {
|
||||||
configFilePath = os.Args[1]
|
configFilePath = os.Args[1]
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultConfigFilePath = "gron.conf"
|
defaultConfigFileName = "gron.conf"
|
||||||
|
|
||||||
defaultOnSuccessMessageFmt = "Job {{.JobName}} finished."
|
defaultOnSuccessMessageFmt = "Job {{.JobName}} finished."
|
||||||
defaultOnErrorMessageFmt = "Job {{.JobName}} failed:\n\n{{.Error}}"
|
defaultOnErrorMessageFmt = "Job {{.JobName}} failed:\n\n{{.Error}}"
|
||||||
|
Loading…
Reference in New Issue
Block a user