Pass over a config path that runs through a file
check / check (push) Failing after 2s

Of the places pixa looks for its config file on its own, one whose path
runs through a file, such as under a HOME of /dev/null, aborted startup
with "not a directory", though no file can be there. It is now passed
over like a file that does not exist, as README.md says.

Model: opus-5-5
This commit is contained in:
2026-10-04 15:59:19 +00:00
parent 52db3cf0c5
commit c29b68e232
+6 -3
View File
@@ -15,6 +15,7 @@ import (
"sort" "sort"
"strconv" "strconv"
"strings" "strings"
"syscall"
"time" "time"
"git.eeqj.de/sneak/smartconfig" "git.eeqj.de/sneak/smartconfig"
@@ -779,10 +780,12 @@ func loadConfigFile(log *slog.Logger, appName string) (*smartconfig.Config, erro
for _, path := range configPaths { for _, path := range configPaths {
cleanPath := filepath.Clean(path) cleanPath := filepath.Clean(path)
// Only a config file that does not exist is skipped. One that // Only a config file that does not exist is skipped, including
// cannot be read or does not parse is a fatal startup error. // one whose path runs through a file, such as under a HOME of
// /dev/null. One that cannot be read or does not parse is a
// fatal startup error.
_, statErr := os.Stat(cleanPath) _, statErr := os.Stat(cleanPath)
if errors.Is(statErr, fs.ErrNotExist) { if errors.Is(statErr, fs.ErrNotExist) || errors.Is(statErr, syscall.ENOTDIR) {
continue continue
} }