mirror of
https://github.com/goreleaser/nfpm.git
synced 2026-06-19 08:05:04 +00:00
fix: semgrep warn
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
+3
-1
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user