File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ func (s Store) Add(ctx context.Context, cred Credential) error {
112
112
}
113
113
114
114
func (s Store ) Remove (ctx context.Context , toolName string ) error {
115
- if len (s .credCtxs ) > 1 {
115
+ if len (s .credCtxs ) > 1 || first ( s . credCtxs ) == AllCredentialContexts {
116
116
return fmt .Errorf ("error: credential deletion is not supported when multiple credential contexts are provided" )
117
117
}
118
118
@@ -160,7 +160,6 @@ func (s Store) List(ctx context.Context) ([]Credential, error) {
160
160
}
161
161
162
162
// Go through the contexts in reverse order so that higher priority contexts override lower ones.
163
- // TODO - is this how we want to do it?
164
163
credsByName := make (map [string ]Credential )
165
164
for i := len (s .credCtxs ) - 1 ; i >= 0 ; i -- {
166
165
for _ , c := range credsByContext [s.credCtxs [i ]] {
You can’t perform that action at this time.
0 commit comments