lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 23.05-pre 25 lines 1.2 kB view raw
1diff --git a/src/Runner.Common/HostContext.cs b/src/Runner.Common/HostContext.cs 2index d4ea48c..15c1800 100644 3--- a/src/Runner.Common/HostContext.cs 4+++ b/src/Runner.Common/HostContext.cs 5@@ -109,7 +109,7 @@ namespace GitHub.Runner.Common 6 } 7 8 // this should give us _diag folder under runner root directory 9- string diagLogDirectory = Path.Combine(new DirectoryInfo(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)).Parent.FullName, Constants.Path.DiagDirectory); 10+ string diagLogDirectory = GetDirectory(WellKnownDirectory.Diag); 11 _traceManager = new TraceManager(new HostTraceListener(diagLogDirectory, hostType, logPageSize, logRetentionDays), this.SecretMasker); 12 } 13 else 14@@ -272,7 +272,10 @@ namespace GitHub.Runner.Common 15 throw new NotSupportedException($"Unexpected well known directory: '{directory}'"); 16 } 17 18- _trace.Info($"Well known directory '{directory}': '{path}'"); 19+ if (_trace != null) 20+ { 21+ _trace.Info($"Well known directory '{directory}': '{path}'"); 22+ } 23 return path; 24 } 25