Skip to content

Commit

Permalink
(GH-1768) Ignore file rename operations check
Browse files Browse the repository at this point in the history
In some scenarios, this check was causing Chocolatey to always report
that the system was in a pending reboot state. Even after a reboot
Chocolatey would still report that it was still pending a reboot.  After
discussion, it was determined that this check has a history of causing
problems, and as a result, the decision was made to remove it.  It will
still do the check, which will now only show up in the debug log, but
this check will no longer go into the overall pending reboot check.
  • Loading branch information
gep13 committed Mar 27, 2019
1 parent 1ff4ab2 commit ba523b4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private bool is_pending_windows_auto_update()
/// Determines whether there is a pending file rename operation waiting on reboot for lock releases.
/// </summary>
/// <returns>
/// <c>true</c> if is pending file rename operations; otherwise, <c>false</c>.
/// <c>false</c>, however, additional information provided in debug log to indicate if it was ignored.
/// </returns>
private bool is_pending_file_rename_operations()
{
Expand All @@ -140,9 +140,11 @@ private bool is_pending_file_rename_operations()
result = (value as string[]).Length != 0;
}

this.Log().Debug(" - Pending File Rename Operations = {0}".format_with(result ? "Flagged" : "Checked"));
this.Log().Debug(" - Pending File Rename Operations = {0}".format_with(result ? "Ignored" : "Checked"));

return result;
// Always return false, as we don't want this check to result in a pending reboot warning/error.
// Instead, this will only provide output in the debug log indicating that the check was ignored.
return false;
}

/// <summary>
Expand Down

0 comments on commit ba523b4

Please sign in to comment.