Skip to content

Commit 32505c6

Browse files
committed
Warn about small amounts of MB, not GB
The number of GB is at most 2, and can be tiny. MB gives a more comprehensible range of values.
1 parent 8c69433 commit 32505c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,11 +1054,12 @@ export async function checkDiskUsage(
10541054
const diskUsage = await checkDiskSpace(
10551055
getRequiredEnvParam("GITHUB_WORKSPACE"),
10561056
);
1057+
const mbInBytes = 1024 * 1024;
10571058
const gbInBytes = 1024 * 1024 * 1024;
10581059
if (diskUsage.free < 2 * gbInBytes) {
10591060
const message =
10601061
"The Actions runner is running low on disk space " +
1061-
`(${(diskUsage.free / gbInBytes).toPrecision(4)} GB available).`;
1062+
`(${(diskUsage.free / mbInBytes).toPrecision(4)} MB available).`;
10621063
if (process.env[EnvVar.HAS_WARNED_ABOUT_DISK_SPACE] !== "true") {
10631064
logger.warning(message);
10641065
} else {

0 commit comments

Comments
 (0)