From c29b68e2323a1e1da5c771c640904dd7ee45e0c0 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Sun, 4 Oct 2026 13:35:36 +0000 Subject: [PATCH] Pass over a config path that runs through a file 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 --- internal/config/config.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 35254b3..a9e583f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -15,6 +15,7 @@ import ( "sort" "strconv" "strings" + "syscall" "time" "git.eeqj.de/sneak/smartconfig" @@ -779,10 +780,12 @@ func loadConfigFile(log *slog.Logger, appName string) (*smartconfig.Config, erro for _, path := range configPaths { cleanPath := filepath.Clean(path) - // Only a config file that does not exist is skipped. One that - // cannot be read or does not parse is a fatal startup error. + // Only a config file that does not exist is skipped, including + // 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) - if errors.Is(statErr, fs.ErrNotExist) { + if errors.Is(statErr, fs.ErrNotExist) || errors.Is(statErr, syscall.ENOTDIR) { continue }