aboutsummaryrefslogtreecommitdiff
path: root/status.go
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-04-14 23:25:03 -0700
committerCaroline Larimore <caroline@larimo.re>2025-04-14 23:25:03 -0700
commit1b1eed2494bca4add8471109481afea9fb5d4769 (patch)
tree5f024b45980fa2a588b87a1144818e5a09c3e36a /status.go
parent5cef64d755632b5dfab181fe5a07b28983f7085a (diff)
allow passing auth file directlyHEADmain
Diffstat (limited to 'status.go')
-rw-r--r--status.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/status.go b/status.go
index d17b9d9..0f41fc7 100644
--- a/status.go
+++ b/status.go
@@ -30,7 +30,12 @@ func main() {
log.Fatal(err.Error())
}
- file, err := os.Open(user.HomeDir + "/.status/auth")
+ var path string = user.HomeDir + "/.status/auth"
+ if len(os.Args) > 2 {
+ path = os.Args[2]
+ }
+
+ file, err := os.Open(path)
if err != nil {
log.Fatal(err.Error())
}