Skip to content

Commit

Permalink
Sanity check. Just list the directories
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Nov 8, 2024
1 parent 04b4193 commit a443081
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/scripts/du.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def prepare_report(directory):
for user, data in report.items():
data["disk_usage_human_readable"] = bytes_to_human_readable(data["disk_usage_bytes"])


with open(OUTPUT_FILE, 'w') as f:
json.dump(report, f, indent=4)

Expand All @@ -51,5 +52,9 @@ def prepare_report(directory):
if len(sys.argv) != 2:
print("Usage: du.py <directory_to_check>")
else:
directory = sys.argv[1]
prepare_report(directory)
path = sys.argv[1]
directories = [d for d in os.listdir(path) if os.path.isdir(os.path.join(path, d))]

with open(OUTPUT_FILE, 'w') as f:
f.write("\n".join(directories))
# prepare_report(directory)

0 comments on commit a443081

Please sign in to comment.