Browse Source

fix: silently go away if we face permissions errors

main
decentral1se 3 years ago
parent
commit
192ea75a9d
No known key found for this signature in database GPG Key ID: 3789458B3D0C410
  1. 4
      distribusi.go

4
distribusi.go

@ -259,10 +259,10 @@ func distribusify(c *cli.Context, root string, ignore []string) error {
if content.Name() == "index.html" { if content.Name() == "index.html" {
file, err := os.ReadFile(path.Join(absPath, content.Name())) file, err := os.ReadFile(path.Join(absPath, content.Name()))
if err != nil { if err != nil {
return err return filepath.SkipDir
} }
if strings.Contains(string(file), generatedInDistribusi) { if strings.Contains(string(file), generatedInDistribusi) {
continue return filepath.SkipDir
} }
} }
files = append(files, path.Join(absPath, content.Name())) files = append(files, path.Join(absPath, content.Name()))

Loading…
Cancel
Save