diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-06-13 23:34:56 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-06-13 23:34:56 +0200 |
commit | 53b23a865a209851d7360dac6962fa44c1aeed06 (patch) | |
tree | b9568b008de8ec012f59947b5b433c11d9bb45ee | |
parent | efbcd857112fdce69006207c853bb1a4a37ca67c (diff) |
Normalize the current directory
-rw-r--r-- | main.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -7,6 +7,7 @@ import ( "flag" "log" "os" + "path/filepath" "syscall" "time" @@ -17,6 +18,8 @@ import ( ) func main() { + Try(os.Chdir(filepath.Dir(os.Args[0]))) + port := flag.Int("port", 8080, "port number") debugp := flag.Bool("debug", false, "run in debug mode") flag.BoolVar(&email.Config.Disabled, "no-email", false, |