In sites/archive/cmd/archive/main.go:49-59, a merged flags variable is constructed but never used:
funcmain(){varflags[]cli.Flagflags=append(flags,browser.Flags...)// merged browser + archive flagsflags=append(flags,Flags...)cli:=&cli.Command{Name:"archive",Usage:"Archive a website",Flags:Flags,// BUG: uses only archive Flags, not the merged `flags`// ...}}
This means browser flags (--user-agent, --timeout, --browser, --cookies-file, --visible) are not available to the archive command, even though browser.FromCommand() is called in the action handler.
Fix
Change Flags: Flags to Flags: flags on line 59.
**Parent:** #1
## Description
In `sites/archive/cmd/archive/main.go:49-59`, a merged `flags` variable is constructed but never used:
```go
func main() {
var flags []cli.Flag
flags = append(flags, browser.Flags...) // merged browser + archive flags
flags = append(flags, Flags...)
cli := &cli.Command{
Name: "archive",
Usage: "Archive a website",
Flags: Flags, // BUG: uses only archive Flags, not the merged `flags`
// ...
}
}
```
This means browser flags (`--user-agent`, `--timeout`, `--browser`, `--cookies-file`, `--visible`) are not available to the archive command, even though `browser.FromCommand()` is called in the action handler.
## Fix
Change `Flags: Flags` to `Flags: flags` on line 59.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent: #1
Description
In
sites/archive/cmd/archive/main.go:49-59, a mergedflagsvariable is constructed but never used:This means browser flags (
--user-agent,--timeout,--browser,--cookies-file,--visible) are not available to the archive command, even thoughbrowser.FromCommand()is called in the action handler.Fix
Change
Flags: FlagstoFlags: flagson line 59.Starting work on this as part of PR 5 (also includes #19). Will fix
Flags: Flagsto use the mergedflagsvariable.Work finished. PR: #36
Fixed
Flags: Flagsto use the mergedflagsvariable that includes browser flags.