From c26e7340c76f1a2906eda23b5e86f7926a143fa1 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Sun, 1 Mar 2026 23:12:49 -0700 Subject: [PATCH] Amsterdam can now find a config file using the AMSTERDAM_CONFIG environment variable --- .vscode/launch.json | 4 +++- config/config.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 0189096..8982920 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -25,7 +25,9 @@ "request": "launch", "mode": "auto", "program": "${workspaceFolder}", - "args": ["-C", "${workspaceFolder}/test2.yaml"] + "env": { + "AMSTERDAM_CONFIG": "${workspaceFolder}/test2.yaml" + } }, ] } diff --git a/config/config.go b/config/config.go index a11e636..59a15a1 100644 --- a/config/config.go +++ b/config/config.go @@ -31,7 +31,7 @@ const AMSTERDAM_COPYRIGHT = "2025-2026" // AmCLI is the command-line interface arguments structure. type AmCLI struct { - ConfigFile string `arg:"-C,--config" help:"Location of the configuration file."` + ConfigFile string `arg:"-C,--config,env:AMSTERDAM_CONFIG" help:"Location of the configuration file."` DebugPanic bool `arg:"--debug-panic" help:"Development Only - disable Echo panic recovery"` BuggyAttachments bool `arg:"--buggy-attachments" help:"Some attachments may be buggy - truncate data if necessary"` }