Skip to content

Instantly share code, notes, and snippets.

@wjkoh
Last active June 30, 2025 05:35
Show Gist options
  • Save wjkoh/4bf7132c80fbf4971bcf3f5a06911675 to your computer and use it in GitHub Desktop.
Save wjkoh/4bf7132c80fbf4971bcf3f5a06911675 to your computer and use it in GitHub Desktop.
Go: How to Install `playwright-go` Dependencies using Taskfile
# https://taskfile.dev
version: '3'
tasks:
playwright:
vars:
PWGO_VER:
sh: go list -m -f "{{ "{{.Version}}" }}" github.com/playwright-community/playwright-go
cmds:
- go install github.com/playwright-community/playwright-go/cmd/playwright@{{.PWGO_VER}}
sources:
- go.mod
generates:
- "{{.GOPATH}}/bin/playwright"
@wjkoh
Copy link
Author

wjkoh commented Jun 30, 2025

$ ls $GOPATH/bin/playwright
ls: /Users/wjkoh/go/bin/playwright: No such file or directory
$ task playwright
task: [playwright] go install github.com/playwright-community/playwright-go/cmd/[email protected]
$ ls $GOPATH/bin/playwright
/Users/wjkoh/go/bin/playwright*
$ task playwright
task: Task "playwright" is up to date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment