Closed hmajid2301 closed 2 weeks ago
Anyone who is using playwright-web-flake, https://github.com/pietdevries94/playwright-web-flake
You can do something like so now: PLAYWRIGHT_DRIVER_PATH="${pkgs.playwright-driver}"
. In my nix flake dev shell: https://gitlab.com/hmajid2301/banterbus/-/blob/a13215011408af7885feb361176ff6db868ef774/shell.nix#L43-46
Thanks @canstand!!!
Happy to help. The PR #501 is aligned with similar behavior of clients like playright-python/dotnet/java
. If it doesn't work well, I tend to create symbolic links or other generic ways.
Does the upstream have similar features?
I don't know, this is a code-specific feature request. Please let me know if I should request is there.
Is your feature request related to a problem? Please describe.
This is probably a very niche use case of this library. I am using Nix to set up my development environment (and also NixOS). I have set up playwright using this flake, https://github.com/pietdevries94/playwright-web-flake.
The cli.js is then made available at this path:
/nix/store/l15bkcb7w90zm1h08qbdq9fc0ssf7sg4-_at_playwright_slash_test-1.47.2/lib/node_modules/@playwright/test/node_modules/playwright-core/cli.js
(for example)As you can see, with the current code in
run.go
and thegetDriverCliJs
function, it expects it to be within the package.Describe the solution you'd like
Would it be possible to maybe set an environment variable or an option to allow us to hardcode this?
Default to this, or allow us to set the path in the constructor? I guess this would make the code a bit more complex. But just a thought.
Additional context
Nix the package manager expects things to be installed differently to a lot of other package managers, so hence this is an issue for me using it.
Thanks in advance