Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Jun 13, 2024
1 parent 0d2b622 commit ac9cf00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions zip7.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ func execBinary(command string, props Props, files []string) (string, error) {
out, err := cmd.Output()

if err != nil {
return string(out[:]), errors.New(string(out[:]))
return string(out), errors.New(string(out))
}

return string(out[:]), nil
return string(out), nil
}

// parseInfoString process raw info data
Expand Down
4 changes: 2 additions & 2 deletions zip7_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ func (s *Z7Suite) TestAdd(c *check.C) {

c.Assert(fsutil.IsExist(resultFile), check.Equals, true)
c.Assert(fsutil.IsReadable(resultFile), check.Equals, true)
c.Assert(fsutil.IsNonEmpty(resultFile), check.Equals, true)
c.Assert(fsutil.IsEmpty(resultFile), check.Equals, false)

ok, err := Check(Props{File: resultFile})

Expand All @@ -512,7 +512,7 @@ func (s *Z7Suite) TestAdd(c *check.C) {

c.Assert(fsutil.IsExist(resultFile), check.Equals, true)
c.Assert(fsutil.IsReadable(resultFile), check.Equals, true)
c.Assert(fsutil.IsNonEmpty(resultFile), check.Equals, true)
c.Assert(fsutil.IsEmpty(resultFile), check.Equals, false)

ok, err = Check(Props{File: resultFile})

Expand Down

0 comments on commit ac9cf00

Please sign in to comment.