From ed40673e8527490256d7d7acc90b952cb48571b6 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 17 Dec 2025 17:04:46 -0800 Subject: [PATCH] Validate input path exists in addInputPath --- mfer/manifest.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mfer/manifest.go b/mfer/manifest.go index 21730ab..357ab08 100644 --- a/mfer/manifest.go +++ b/mfer/manifest.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io/fs" + "os" "path" "path/filepath" "strings" @@ -64,7 +65,10 @@ func (m *manifest) addInputPath(inputPath string) error { if err != nil { return err } - // FIXME check to make sure inputPath/abs exists maybe + // Validate path exists + if _, err := os.Stat(abs); err != nil { + return fmt.Errorf("path does not exist: %s", inputPath) + } afs := afero.NewReadOnlyFs(afero.NewBasePathFs(afero.NewOsFs(), abs)) return m.addInputFS(afs) }