Skip to content

Commit

Permalink
Merge pull request #7 from kitagry/fix-on-linux
Browse files Browse the repository at this point in the history
Check os.FileMode
  • Loading branch information
tkuchiki authored Aug 17, 2022
2 parents ffb7e56 + c8afd36 commit e32a6cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/slp/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewRootCmd(version string) *cobra.Command {
if err != nil {
return err
}
if fi.Size() == 0 {
if fi.Mode()&os.ModeNamedPipe == 0 {
cmd.Usage()
slowlogFile.Close()
return nil
Expand Down

0 comments on commit e32a6cf

Please sign in to comment.