chore(cmd/joj3): just return on csv path not set
All checks were successful
submodules sync / sync (push) Successful in 47s
build / build (push) Successful in 1m31s
build / trigger-build-image (push) Successful in 8s

This commit is contained in:
张泊明518370910136 2024-11-19 04:07:11 -05:00
parent e4e7445645
commit b767902922
GPG Key ID: D47306D7062CDA9D

View File

@ -63,6 +63,10 @@ func getSlogAttrs(csvPath string) (attrs []slog.Attr) {
slog.String("repository", env.Attr.Repository),
slog.String("sha", env.Attr.Sha),
}
// if csvPath is empty, just return
if csvPath == "" {
return
}
file, err := os.Open(csvPath)
if err != nil {
slog.Error("open csv", "error", err)