Skip to content

[Feature]: Allow us to set the full path to cli js (driver) #496

@hmajid2301

Description

@hmajid2301

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 the getDriverCliJs 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.

filepath.Join(driverDirectory, "package", "cli.js")

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions