Remove --no-install
All checks were successful
Build / build (push) Successful in 2m24s

This commit is contained in:
Sebastiaan de Schaetzen 2025-02-10 13:19:56 +01:00
parent acc5bcdcfc
commit b9079e1e55
2 changed files with 4 additions and 7 deletions

View File

@ -16,4 +16,4 @@ COPY *.go ./
RUN go build -o /vivaplusdl
RUN /vivaplusdl --install
CMD ["/vivaplusdl", "--no-install"]
CMD ["/vivaplusdl"]

View File

@ -12,19 +12,16 @@ import (
func main() {
var err error
var noInstall = flag.Bool("no-install", false, "skip browser installation")
var onlyInstall = flag.Bool("install", false, "install the required browser and do nothing else")
flag.Parse()
options := &playwright.RunOptions{
Browsers: []string{"firefox"},
}
if !*noInstall {
err = playwright.Install(options)
if err != nil {
log.Panicf("error installing playwright: %v", err)
}
}
if *onlyInstall {
return