Skip to content

Commit

Permalink
uploader: log config dir read
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <katexochen0@gmail.com>
  • Loading branch information
katexochen committed Dec 13, 2024
1 parent 2bb3637 commit 57faccc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func runUpload(cmd *cobra.Command, args []string) error {
return fmt.Errorf("parsing flags: %w", err)
}

conf, err := parseConfigFiles(flags.configPath)
conf, err := parseConfigFiles(flags.configPath, logger)
if err != nil {
return fmt.Errorf("parsing config files: %w", err)
}
Expand Down Expand Up @@ -257,7 +257,7 @@ type Uploader interface {
Upload(ctx context.Context, image io.ReadSeeker, size int64) (refs []string, retErr error)
}

func parseConfigFiles(configPath string) (*config.ConfigFile, error) {
func parseConfigFiles(configPath string, log *log.Logger) (*config.ConfigFile, error) {
configLocation := path.Join(configPath, configName)
configDirLocation := path.Join(configPath, configDir)

Expand All @@ -273,6 +273,7 @@ func parseConfigFiles(configPath string) (*config.ConfigFile, error) {
if err != nil {
return nil, fmt.Errorf("reading config dir: %w", err)
}
log.Printf("Reading config files from %s\n", configDirLocation)
for _, dirEntry := range dirEntries {
var cfgOverlay config.ConfigFile
if dirEntry.IsDir() {
Expand Down

0 comments on commit 57faccc

Please sign in to comment.