Skip to content

Commit 001564c

Browse files
committed
Allow writing the credential store in use
This can be useful when consuming the context adapter as source.
1 parent e978fc8 commit 001564c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/CredentialManager/CommandContext.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ namespace GitCredentialManager;
1616
class CommandContextAdapter : ICommandContext
1717
{
1818
readonly CommandContext context;
19-
readonly ICredentialStore store;
2019
readonly ISettings settings;
2120
readonly IHttpClientFactory clientFactory;
21+
ICredentialStore store;
2222

2323
public CommandContextAdapter(CommandContext context, string? @namespace = default)
2424
{
@@ -37,7 +37,11 @@ context.Settings is WindowsSettings ?
3737

3838
public ISettings Settings => settings;
3939

40-
public ICredentialStore CredentialStore => store;
40+
public ICredentialStore CredentialStore
41+
{
42+
get => store;
43+
set => store = value;
44+
}
4145

4246
public IHttpClientFactory HttpClientFactory => clientFactory;
4347

0 commit comments

Comments
 (0)