File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ internal sealed class CheckForUpdatesFilter(ConsoleAppFilter next) : ConsoleAppF
16
16
public override async Task InvokeAsync ( ConsoleAppContext context , Cancel ctx )
17
17
{
18
18
await Next . InvokeAsync ( context , ctx ) ;
19
+ if ( ! string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "CI" ) ) )
20
+ return ;
21
+
19
22
var latestVersionUrl = await GetLatestVersion ( ctx ) ;
20
23
if ( latestVersionUrl is null )
21
24
ConsoleApp . LogError ( "Unable to determine latest version" ) ;
@@ -54,9 +57,6 @@ private static void CompareWithAssemblyVersion(Uri latestVersionUrl)
54
57
55
58
private async ValueTask < Uri ? > GetLatestVersion ( Cancel ctx )
56
59
{
57
- if ( ! string . IsNullOrEmpty ( Environment . GetEnvironmentVariable ( "CI" ) ) )
58
- return null ;
59
-
60
60
// only check for new versions once per hour
61
61
if ( _stateFile . Exists && _stateFile . LastWriteTimeUtc >= DateTime . UtcNow . Subtract ( TimeSpan . FromHours ( 1 ) ) )
62
62
{
You can’t perform that action at this time.
0 commit comments