зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 801771: Only create console hyperlinks in dev builds
If someone explicitly passes /fancyconsole in an AzureDevOps build, hyperlinks would be enabled. That's a weird configuration but some of the BuildXL repo automation was doing it. This additional check prevents that case.
This commit is contained in:
Родитель
9fe30c7fd9
Коммит
0562f13325
|
@ -169,7 +169,7 @@ namespace BuildXL
|
|||
|
||||
private TimeSpan TelemetryFlushTimeout => m_configuration.Logging.RemoteTelemetryFlushTimeout ?? AriaV2StaticState.DefaultShutdownTimeout;
|
||||
|
||||
private static readonly Lazy<bool> m_isSShSession = new Lazy<bool>(() => Environment.GetEnvironmentVariable("SSH_CLIENT") != null);
|
||||
private static readonly Lazy<bool> s_isSShSession = new Lazy<bool>(() => Environment.GetEnvironmentVariable("SSH_CLIENT") != null);
|
||||
|
||||
/// <nodoc />
|
||||
[SuppressMessage("Microsoft.Reliability", "CA2000:DisposeObjectsBeforeLosingScope")]
|
||||
|
@ -2865,7 +2865,7 @@ namespace BuildXL
|
|||
|
||||
// Don't make the path a hyperlink if running in an SSH session since that link won't
|
||||
// be opened reasonably on the client of that SSH session.
|
||||
if (m_configuration.Logging.FancyConsole && !m_isSShSession.Value)
|
||||
if (m_configuration.Infra == Infra.Developer && m_configuration.Logging.FancyConsole && !s_isSShSession.Value)
|
||||
{
|
||||
m_console.WriteHyperlink(MessageLevel.Info, path, @"file://" + path.TrimStart('/'));
|
||||
WriteLineToConsole(string.Empty);
|
||||
|
|
Загрузка…
Ссылка в новой задаче