Skip to content
Permalink
Browse files

fix: snapcraft: broken permissions

  • Loading branch information...
caarlos0 committed Dec 12, 2018
1 parent 7060eb8 commit 513473b4463a24d1ea821e12a7634885b9780c24
Showing with 5 additions and 2 deletions.
  1. +5 −2 internal/pipe/snapcraft/snapcraft.go
@@ -2,7 +2,6 @@
package snapcraft

import (
"errors"
"fmt"
"io/ioutil"
"os"
@@ -17,6 +16,7 @@ import (
"github.com/goreleaser/goreleaser/internal/semerrgroup"
"github.com/goreleaser/goreleaser/internal/tmpl"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/pkg/errors"
yaml "gopkg.in/yaml.v2"
)

@@ -169,7 +169,10 @@ func create(ctx *context.Context, arch string, binaries []artifact.Artifact) err

destBinaryPath := filepath.Join(primeDir, filepath.Base(binary.Path))
if err = os.Link(binary.Path, destBinaryPath); err != nil {
return err
return errors.Wrap(err, "failed to link binary")
}
if err := os.Chmod(destBinaryPath, 0555); err != nil {
return errors.Wrap(err, "failed to change binary permissions")
}
}

0 comments on commit 513473b

Please sign in to comment.
You can’t perform that action at this time.