Skip to content

Commit

Permalink
Final size
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmogul committed Sep 24, 2023
1 parent f7a2222 commit 9cf828c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ def load_server_data(ENV, network, ROOT_DIR, region):

# Check available disk space
required_space = snapshot_size * 2.5
available_space = get_available_space(SNAPSHOT_DIR)
available_space = get_available_space(ROOT_DIR)
final_size = available_space - required_space + snapshot_size
if available_space < required_space:
print(
f"Error: Not enough disk space available. Minimum Required: {format_size(required_space)}+, Available: {format_size(available_space)}."
Expand All @@ -293,7 +294,7 @@ def load_server_data(ENV, network, ROOT_DIR, region):
exit(1)
else:
print(
f"* Available disk space: {format_size(available_space)} - Estimated required space: {format_size(required_space)} - Estimated available space after unpacking: {format_size(available_space - required_space - snapshot_size)} "
f"* Available disk space: {format_size(available_space)} - Estimated required space: {format_size(required_space)} - Estimated available space after unpacking: {format_size(final_size)} "
)

# Extract the tar archive and check the exit status
Expand Down

0 comments on commit 9cf828c

Please sign in to comment.