Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-Content -Head and -Tail disallow negative values and cleanup #19715

Merged
merged 15 commits into from
Jun 21, 2023
Prev Previous commit
Next Next commit
remove space
  • Loading branch information
CarloToso committed May 24, 2023
commit f74f1e8ffccc4279c1c23d9f85ccb82ce61c8864
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ protected override void ProcessRecord()
// Make sure we only ask for the amount the user wanted
// I am using TotalCount - countToRead so that I don't
// have to worry about overflow

if (TotalCount > 0 && (countToRead == 0 || TotalCount - countToRead < countRead))
{
countToRead = TotalCount - countRead;
Expand Down