8000 fix: artifacts.json should be 0644 instead of 0600 (#2801) · goreleaser/goreleaser@bbd79a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit bbd79a1

8000 Browse files
authored
fix: artifacts.json should be 0644 instead of 0600 (#2801)
1 parent e2c3127 commit bbd79a1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

internal/pipe/artifacts/artifacts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ func (Pipe) Run(ctx *context.Context) error {
2424
}
2525
path := filepath.Join(ctx.Config.Dist, "artifacts.json")
2626
log.Log.WithField("file", path).Info("writing")
27-
return os.WriteFile(path, bts, 0o600)
27+
return os.WriteFile(path, bts, 0o644)
2828
}

internal/pipe/artifacts/artifacts_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package artifacts
22

33
import (
4+
"os"
45
"path/filepath"
56
"testing"
67

@@ -30,5 +31,10 @@ func TestArtifacts(t *testing.T) {
3031
})
3132

3233
require.NoError(t, Pipe{}.Run(ctx))
33-
golden.RequireEqualJSON(t, golden.RequireReadFile(t, filepath.Join(tmp, "artifacts.json")))
34+
path := filepath.Join(tmp, "artifacts.json")
35+
golden.RequireEqualJSON(t, golden.RequireReadFile(t, path))
36+
37+
info, err := os.Stat(path)
38+
require.NoError(t, err)
39+
require.Equal(t, "-rw-r--r--", info.Mode().String())
3440
}

0 commit comments

Comments
 (0)
0