Skip to content

Commit

Permalink
1Password: handle injected service accounts.
Browse files Browse the repository at this point in the history
  • Loading branch information
n-g committed Nov 16, 2023
1 parent 8a6e366 commit 8b99ba1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/providers/onepassword/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"bytes"
"context"
"fmt"
"os"
"os/exec"
"sync"
"time"
Expand Down Expand Up @@ -64,6 +65,11 @@ func (p *provider) ensureAccount(ctx context.Context) error {

// Only check once if there is an account.
p.once.Do(func() {
if os.Getenv("OP_SERVICE_ACCOUNT_TOKEN") != "" {
return
}

// Handle manual logins.
c := exec.CommandContext(ctx, "op", "account", "list")

var b bytes.Buffer
Expand Down

0 comments on commit 8b99ba1

Please sign in to comment.