Skip to content

Commit 3c90bd2

Browse files
author
Vincent Demeester
authored
Merge pull request #83 from tych0/expose-pass-initialized
pass backend: expose pass initialized flag
2 parents 7efaffb + b8fb969 commit 3c90bd2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pass/pass_linux.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import (
2020
const PASS_FOLDER = "docker-credential-helpers"
2121

2222
var (
23-
passInitialized bool
23+
PassInitialized bool
2424
)
2525

2626
func init() {
27-
passInitialized = exec.Command("pass").Run() == nil
27+
PassInitialized = exec.Command("pass").Run() == nil
2828
}
2929

3030
func runPass(stdinContent string, args ...string) (string, error) {
@@ -82,7 +82,7 @@ type Pass struct{}
8282

8383
// Add adds new credentials to the keychain.
8484
func (h Pass) Add(creds *credentials.Credentials) error {
85-
if !passInitialized {
85+
if !PassInitialized {
8686
return errors.New("pass store is uninitialized")
8787
}
8888

@@ -98,7 +98,7 @@ func (h Pass) Add(creds *credentials.Credentials) error {
9898

9999
// Delete removes credentials from the store.
100100
func (h Pass) Delete(serverURL string) error {
101-
if !passInitialized {
101+
if !PassInitialized {
102102
return errors.New("pass store is uninitialized")
103103
}
104104

@@ -145,7 +145,7 @@ func listPassDir(args ...string) ([]os.FileInfo, error) {
145145

146146
// Get returns the username and secret to use for a given registry server URL.
147147
func (h Pass) Get(serverURL string) (string, string, error) {
148-
if !passInitialized {
148+
if !PassInitialized {
149149
return "", "", errors.New("pass store is uninitialized")
150150
}
151151

@@ -171,7 +171,7 @@ func (h Pass) Get(serverURL string) (string, string, error) {
171171

172172
// List returns the stored URLs and corresponding usernames for a given credentials label
173173
func (h Pass) List() (map[string]string, error) {
174-
if !passInitialized {
174+
if !PassInitialized {
175175
return nil, errors.New("pass store is uninitialized")
176176
}
177177

0 commit comments

Comments
 (0)