Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@
additionalArgs = append(additionalArgs, "--only-shell")
}

if d.options.NoInstallShell {
additionalArgs = append(additionalArgs, "--no-shell")
}

if d.options.DryRun {
additionalArgs = append(additionalArgs, "--dry-run")
}
Expand Down Expand Up @@ -239,7 +243,9 @@
// - Linux: ~/.cache
DriverDirectory string
// OnlyInstallShell only downloads the headless shell. (For chromium browsers only)
OnlyInstallShell bool

Check failure on line 246 in run.go

View workflow job for this annotation

GitHub Actions / Lint

File is not properly formatted (gofumpt)
// NoInstallShell does not install chromium headless shell. (For chromium browsers only)
NoInstallShell bool
SkipInstallBrowsers bool
// if not set and SkipInstallBrowsers is false, will download all browsers (chromium, firefox, webkit)
Browsers []string
Expand Down Expand Up @@ -297,6 +303,9 @@
if len(options) == 1 {
option = options[0]
}
if option.OnlyInstallShell && option.NoInstallShell {
return nil, fmt.Errorf("OnlyInstallShell and NoInstallShell cannot be set at the same time")
}
if option.DriverDirectory == "" { // if user did not set it, try to get it from env
option.DriverDirectory = os.Getenv("PLAYWRIGHT_DRIVER_PATH")
}
Expand Down
Loading