cmd/app: omit hidden files
Test / Create distribution (push) Successful in 1m4s
Test / Sandbox (push) Successful in 2m58s
Test / ShareFS (push) Successful in 4m1s
Test / Hakurei (push) Successful in 4m11s
Test / Sandbox (race detector) (push) Successful in 5m37s
Test / Hakurei (race detector) (push) Successful in 6m48s
Test / Flake checks (push) Successful in 1m9s

This avoids vim swap files breaking scripts.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-07-07 13:26:58 +09:00
parent 4a42657d88
commit 810b806a15
2 changed files with 19 additions and 23 deletions
+17
View File
@@ -4,6 +4,7 @@ import (
"bufio"
"fmt"
"io"
"os"
"strconv"
"strings"
@@ -335,3 +336,19 @@ func parse(
return &c, nil
}
// list prints names of non-hidden entries in pathname.
func list(pathname *check.Absolute, dir bool) error {
dents, err := os.ReadDir(pathname.String())
if err != nil {
return err
}
for _, dent := range dents {
name := dent.Name()
if (dent.IsDir() != dir) || (len(name) > 0 && name[0] == '.') {
continue
}
fmt.Println(dent.Name())
}
return nil
}