Skip to content

Commit

Permalink
fix(pack): Don't print if is os.ErrNotExist
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 committed Mar 23, 2024
1 parent 5d79f35 commit e1bc4ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/util/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"archive/zip"
"bytes"
"compress/flate"
"errors"
"fmt"
"io"
"io/fs"
Expand Down Expand Up @@ -39,7 +40,9 @@ func PackZipWithoutGitIgnoreFiles() ([]byte, error) {

ignoreObject, err := gitignore.CompileIgnoreFile("./.gitignore")
if err != nil {
fmt.Println("Error compiling .gitignore file:", err)
if !errors.Is(err, fs.ErrNotExist) {
fmt.Println("Error compiling .gitignore file:", err)
}
}

err = filepath.Walk(".", func(path string, info fs.FileInfo, err error) error {
Expand Down

0 comments on commit e1bc4ee

Please sign in to comment.