Skip to content

Commit 6b75ba8

Browse files
committed
split by any whitespace, not just tabs
1 parent 9437c7e commit 6b75ba8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/coordinator/src/cleaner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ export class TempFileCleaner {
5858
const maxAgeMinutes = this.opts.maxAgeMinutes;
5959

6060
const ignoreStartingPoint = ["!", "-path", startingPoint];
61-
const onlyDirectDecendants = ["-maxdepth", "1"];
61+
const onlyDirectDescendants = ["-maxdepth", "1"];
6262
const onlyOldFiles = ["-mmin", `+${maxAgeMinutes}`];
6363

6464
const baseArgs = [
6565
startingPoint,
6666
...ignoreStartingPoint,
67-
...onlyDirectDecendants,
67+
...onlyDirectDescendants,
6868
...onlyOldFiles,
6969
];
7070

@@ -76,7 +76,7 @@ export class TempFileCleaner {
7676

7777
const duLines = duOutput.stdout.trim().split("\n");
7878
const fileCount = duLines.length - 1; // last line is the total
79-
const fileSize = duLines.at(-1)?.split("\t")[0];
79+
const fileSize = duLines.at(-1)?.trim().split(/\s+/)[0];
8080

8181
if (fileCount === 0) {
8282
this.logger.log("nothing to delete", { startingPoint, maxAgeMinutes });

0 commit comments

Comments
 (0)