fix: semgrep warn

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2026-03-20 11:22:19 -03:00
parent 027a556c44
commit 3aba25cbee
+3 -1
View File
@@ -2,8 +2,10 @@
package msix package msix
import ( import (
"errors"
"fmt" "fmt"
"io" "io"
"io/fs"
"log" "log"
"os" "os"
"strconv" "strconv"
@@ -270,7 +272,7 @@ func addContents(builder *msix.Builder, info *nfpm.Info) error {
func configureSigning(builder *msix.Builder, info *nfpm.Info) error { func configureSigning(builder *msix.Builder, info *nfpm.Info) error {
pfxPath := info.MSIX.Signature.PFXFile pfxPath := info.MSIX.Signature.PFXFile
if _, err := os.Stat(pfxPath); err != nil { if _, err := os.Stat(pfxPath); err != nil {
if os.IsNotExist(err) { if errors.Is(err, fs.ErrNotExist) {
return fmt.Errorf("PFX file not found: %w", err) return fmt.Errorf("PFX file not found: %w", err)
} }
return fmt.Errorf("unable to access PFX file: %w", err) return fmt.Errorf("unable to access PFX file: %w", err)