summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2025-06-13 23:34:56 +0200
committerThomas Voss <mail@thomasvoss.com> 2025-06-13 23:34:56 +0200
commit53b23a865a209851d7360dac6962fa44c1aeed06 (patch)
treeb9568b008de8ec012f59947b5b433c11d9bb45ee
parentefbcd857112fdce69006207c853bb1a4a37ca67c (diff)
Normalize the current directory
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index 20c9fd6..f5c039a 100644
--- a/main.go
+++ b/main.go
@@ -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,