sources.go | 6 +++++- diff --git a/sources.go b/sources.go index 5255da3eac34ca84a01a403266319faa4d3c71a347d11b7cbd62f18e75ed956a..04f5efb22f274b6b571c6eb8bf81bc878a1b01e4b28f5d4377510078574d197a 100644 --- a/sources.go +++ b/sources.go @@ -18,6 +18,7 @@ package main import ( + "log" "os" "path" "path/filepath" @@ -33,6 +34,9 @@ } cwd, f := path.Split(path.Join(Cwd, tgt)) fdDep, err := os.Open(path.Join(cwd, RedoDir, f+DepSuffix)) if err != nil { + if os.IsNotExist(err) { + continue + } return nil, err } depInfo, err := depRead(fdDep) @@ -48,7 +52,7 @@ seen[cwdMustRel(depTgtAbsPath)] = struct{}{} } else if depTgtAbsPath != tgtAbsPath { subSrcs, err := sourcesWalker([]string{cwdMustRel(depTgtAbsPath)}) if err != nil { - panic(err) + log.Fatalln(err) } for _, p := range subSrcs { seen[p] = struct{}{}