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.
This commit is contained in:
parent
8c69433c34
commit
32505c6f2d
1 changed files with 2 additions and 1 deletions
|
|
@ -1054,11 +1054,12 @@ export async function checkDiskUsage(
|
|||
const diskUsage = await checkDiskSpace(
|
||||
getRequiredEnvParam("GITHUB_WORKSPACE"),
|
||||
);
|
||||
const mbInBytes = 1024 * 1024;
|
||||
const gbInBytes = 1024 * 1024 * 1024;
|
||||
if (diskUsage.free < 2 * gbInBytes) {
|
||||
const message =
|
||||
"The Actions runner is running low on disk space " +
|
||||
`(${(diskUsage.free / gbInBytes).toPrecision(4)} GB available).`;
|
||||
`(${(diskUsage.free / mbInBytes).toPrecision(4)} MB available).`;
|
||||
if (process.env[EnvVar.HAS_WARNED_ABOUT_DISK_SPACE] !== "true") {
|
||||
logger.warning(message);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue