Skip to content

Commit eb00ef2

Browse files
authored
fix: make config.yaml optional (#1783)
This file should not be required.
1 parent e3c9e31 commit eb00ef2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/librarian/state.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ func parseLibrarianState(path, source string) (*config.LibrarianState, error) {
7676
func parseLibrarianConfig(path string) (*config.LibrarianConfig, error) {
7777
bytes, err := os.ReadFile(path)
7878
if err != nil {
79+
if errors.Is(err, os.ErrNotExist) {
80+
slog.Info("config.yaml not found, proceeding")
81+
return nil, nil
82+
}
7983
return nil, err
8084
}
8185
var lc config.LibrarianConfig

0 commit comments

Comments
 (0)