Skip to content

Commit 8195913

Browse files
committed
Fix failed check output
1 parent bd76fe2 commit 8195913

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ Token expiration: NONE
88
Rate limit usage: 6 / 5000 (~0%)
99
OAuth scopes: gist, read:org, repo, workflow
1010

11-
$ TOKEN="<some expiring token>" github-token-monitor --token-env-vars TOKEN
12-
Checking "TOKEN"...
11+
$ OLD_TOKEN="<some expiring token>" github-token-monitor --token-env-vars OLD_TOKEN
12+
Checking "OLD_TOKEN"...
1313
Token user login: your-github-username
1414
Token expiration: 2025-07-09 21:27:10 +0000 UTC (9.1 days)
1515
WARNING: Expiring soon!
1616
Rate limit usage: 9 / 5000 (~0%)
1717
OAuth scopes: read:packages
1818

19+
Error: checks failed for token(s): OLD_TOKEN
1920
exit status 1
2021
```
2122

main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ var flags struct {
3636

3737
func main() {
3838
err := run()
39-
if _, isFailedChecks := err.(failedChecksError); isFailedChecks {
40-
os.Exit(1)
41-
}
4239
if err != nil {
4340
fmt.Printf("Error: %v\n", err)
44-
os.Exit(2)
41+
os.Exit(1)
4542
}
4643
}
4744

0 commit comments

Comments
 (0)