Skip to content

Commit

Permalink
Fixed incorrect size of unnecessary data // Resolve #3830
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Mar 9, 2021
1 parent ae26079 commit c6ab782
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platformio/maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ def check_prune_system():
if threshold_mb <= 0:
return

unnecessary_mb = calculate_unnecessary_system_data() / 1024
if unnecessary_mb < threshold_mb:
unnecessary_size = calculate_unnecessary_system_data()
if (unnecessary_size / 1024) < threshold_mb:
return

terminal_width, _ = click.get_terminal_size()
Expand All @@ -360,6 +360,6 @@ def check_prune_system():
"We found %s of unnecessary PlatformIO system data (temporary files, "
"unnecessary packages, etc.).\nUse `pio system prune --dry-run` to list "
"them or `pio system prune` to save disk space."
% fs.humanize_file_size(unnecessary_mb),
% fs.humanize_file_size(unnecessary_size),
fg="yellow",
)

0 comments on commit c6ab782

Please sign in to comment.