Skip to content

Commit

Permalink
fix: snapcraft: broken permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Dec 12, 2018
1 parent 7060eb8 commit 513473b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/pipe/snapcraft/snapcraft.go
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
package snapcraft package snapcraft


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


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


destBinaryPath := filepath.Join(primeDir, filepath.Base(binary.Path)) destBinaryPath := filepath.Join(primeDir, filepath.Base(binary.Path))
if err = os.Link(binary.Path, destBinaryPath); err != nil { 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")
} }
} }


Expand Down

0 comments on commit 513473b

Please sign in to comment.