Skip to content

Commit d48aaf3

Browse files
committed
trace2: pass to GPG
Pass instance of Trace2 to Gpg in preparation for capturing exceptions, which will be added in a future commit.
1 parent dfd3dad commit d48aaf3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/shared/Core/CredentialStore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private void EnsureBackingStore()
7979

8080
case StoreNames.Gpg:
8181
ValidateGpgPass(out string gpgStoreRoot, out string gpgExec);
82-
IGpg gpg = new Gpg(gpgExec, _context.SessionManager, _context.ProcessManager);
82+
IGpg gpg = new Gpg(gpgExec, _context.SessionManager, _context.ProcessManager, _context.Trace2);
8383
_backingStore = new GpgPassCredentialStore(_context.FileSystem, gpg, gpgStoreRoot, ns);
8484
break;
8585

src/shared/Core/Gpg.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ public class Gpg : IGpg
1515
private readonly string _gpgPath;
1616
private readonly ISessionManager _sessionManager;
1717
private readonly IProcessManager _processManager;
18+
private readonly ITrace2 _trace2;
1819

19-
public Gpg(string gpgPath, ISessionManager sessionManager, IProcessManager processManager)
20+
public Gpg(string gpgPath, ISessionManager sessionManager, IProcessManager processManager, ITrace2 trace2)
2021
{
2122
EnsureArgument.NotNullOrWhiteSpace(gpgPath, nameof(gpgPath));
2223
EnsureArgument.NotNull(sessionManager, nameof(sessionManager));
24+
EnsureArgument.NotNull(trace2, nameof(trace2));
2325

2426
_gpgPath = gpgPath;
2527
_sessionManager = sessionManager;
2628
_processManager = processManager;
29+
_trace2 = trace2;
2730
}
2831

2932
public string DecryptFile(string path)

0 commit comments

Comments
 (0)