Skip to content

Commit

Permalink
Optionally take password from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
lxcode committed Mar 22, 2024
1 parent dcce648 commit f31738f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ func authenticate(cctx *cli.Context) (*xrpc.AuthInfo, error) {
return nil, err
}

authInfo, err := authenticator.Authenticate(cctx.String("handle"), cctx.String("password"))
password := os.Getenv("BSKY_PASSWORD")
if password == "" {
password = cctx.String("password")
}

authInfo, err := authenticator.Authenticate(cctx.String("handle"), password)
if err != nil {
log.Fatalf("Failed to authenticate: %+v", err)
return nil, err
Expand Down

0 comments on commit f31738f

Please sign in to comment.