Skip to content

Commit a79ba95

Browse files
JusterZhuCopilot
andauthored
Update src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 674a4f3 commit a79ba95

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,20 @@ private void InitBlackList()
246246
}
247247

248248
private bool CanSkip(bool isForcibly)
249-
=> !isForcibly && _customSkipOption?.Invoke() == true;
249+
{
250+
if (isForcibly)
251+
{
252+
return false;
253+
}
250254

255+
// Treat a null custom skip option as "do not skip".
256+
if (_customSkipOption is null)
257+
{
258+
return false;
259+
}
260+
261+
return _customSkipOption();
262+
}
251263
private static bool CheckUpgrade(VersionRespDTO? response)
252264
=> response?.Code == 200 && response.Body?.Count > 0;
253265

0 commit comments

Comments
 (0)