Skip to content

Commit

Permalink
Allow perform wayback no browser detection
Browse files Browse the repository at this point in the history
  • Loading branch information
waybackarchiver committed Jun 26, 2024
1 parent bb0c562 commit f8019cd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions reduxer/reduxer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"io"
"net/url"
"os"
"os/exec"
"path/filepath"
"strings"
"sync"
Expand Down Expand Up @@ -148,6 +149,12 @@ func Do(ctx context.Context, opts *config.Options, urls ...*url.URL) (Reduxer, e
return bs, errors.New("Specify directory to environment `WAYBACK_STORAGE_DIR` to enable reduxer")
}

// No supported browser found, returns empty results to ensure archives are normal.
if _, err := exec.LookPath(helper.FindChromeExecPath()); err != nil {

Check failure on line 153 in reduxer/reduxer.go

View workflow job for this annotation

GitHub Actions / golangci-lint / golangci (windows-latest)

shadow: declaration of "err" shadows declaration at line 146 (govet)

Check failure on line 153 in reduxer/reduxer.go

View workflow job for this annotation

GitHub Actions / golangci-lint / golangci (ubuntu-latest)

shadow: declaration of "err" shadows declaration at line 146 (govet)

Check failure on line 153 in reduxer/reduxer.go

View workflow job for this annotation

GitHub Actions / golangci-lint / golangci (macos-latest)

shadow: declaration of "err" shadows declaration at line 146 (govet)
logger.Debug("No browser detected, no artifacts scraped.")
return bs, nil
}

dir, err := createDir(opts.StorageDir())
if err != nil {
return bs, errors.Wrap(err, "create storage directory failed")
Expand Down

0 comments on commit f8019cd

Please sign in to comment.