mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-30 04:50:45 +02:00
fix: gosec lint issues
This commit is contained in:
parent
5cc504fb94
commit
431c28b2bd
@ -104,8 +104,7 @@ func process(ctx *context.Context, docker config.Docker, artifact artifact.Artif
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to create temporaty dir")
|
||||
}
|
||||
defer os.RemoveAll(tmp)
|
||||
log.Info("tempdir: " + tmp)
|
||||
log.Debug("tempdir: " + tmp)
|
||||
// nolint:prealloc
|
||||
var images []string
|
||||
for _, tagTemplate := range docker.TagTemplates {
|
||||
|
2
internal/pipeline/env/env.go
vendored
2
internal/pipeline/env/env.go
vendored
@ -56,7 +56,7 @@ func loadEnv(env, path string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
f, err := os.Open(path)
|
||||
f, err := os.Open(path) // #nosec
|
||||
if os.IsNotExist(err) {
|
||||
return "", nil
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ func New(target io.Writer) Archive {
|
||||
|
||||
// Add a file to the zip archive
|
||||
func (a Archive) Add(name, path string) (err error) {
|
||||
file, err := os.Open(path)
|
||||
file, err := os.Open(path) // #nosec
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ type Project struct {
|
||||
|
||||
// Load config file
|
||||
func Load(file string) (config Project, err error) {
|
||||
f, err := os.Open(file)
|
||||
f, err := os.Open(file) // #nosec
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user