Skip to content

Commit

Permalink
playtak: Accept password in an env var
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Feb 27, 2024
1 parent f1f728a commit 7af1aca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/internal/playtak/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ func (c *Command) Execute(ctx context.Context, flag *flag.FlagSet, _ ...interfac
if c.accept != "" || c.takbot != "" || c.observe != "" {
c.once = true
}
if c.pass == "" {
c.pass = os.Getenv("TAKTICIAN_PLAYTAK_PASSWORD")
}
if c.pass == "" {
log.Printf("Fatal: Must specify -pass= or $TAKTICIAN_PLAYTAK_PASSWORD")
return subcommands.ExitFailure
}
var fpaRuleset FPARule
if c.fpa != "" {
c.friendly = true
Expand Down

0 comments on commit 7af1aca

Please sign in to comment.