Skip to content

Commit

Permalink
Update v3/internal/commands/tool_package.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
leaanthony and coderabbitai[bot] authored Nov 24, 2024
1 parent 473bbfb commit bd568e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion v3/internal/commands/tool_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ func ToolPackage(options *flags.ToolPackage) error {
}

// Check if config file exists
if _, err := os.Stat(configPath); err != nil {
if info, err := os.Stat(configPath); err != nil {
return fmt.Errorf("config file not found: %s", configPath)
} else if info.Mode().Perm()&0444 == 0 {
return fmt.Errorf("config file is not readable: %s", configPath)
}

// Generate output filename based on format
Expand Down

0 comments on commit bd568e6

Please sign in to comment.