Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overridable platform via env #329

Open
compulim opened this issue Oct 17, 2021 · 1 comment
Open

Overridable platform via env #329

compulim opened this issue Oct 17, 2021 · 1 comment

Comments

@compulim
Copy link

While running npm install chromedriver under Linux, some devs may want to install Windows binary instead.

For example, when installing under WSL2, we opt for Windows binary as it will open Chrome in Windows, instead of Chrome in WSLg. And it is okay to run chromedriver.exe (or any .exe) under WSL.

Sidenote, a way to detect if running under WSL or not, is to look at /proc/version and see if it contains keyword "WSL2".

compulim@ubuntu:~$ cat /proc/version
Linux version 5.10.43.3-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Wed Jun 16 23:47:55 UTC 2021
@giggio
Copy link
Owner

giggio commented Oct 18, 2021

@compulim interesting problem! I work a lot with WSL as well and hadn't thought of this workaround.
I wouldn't do it by default, but an option would be interesting. I usually run chrome headless, so I actually prefer Linux's Chrome.
So, yes, a --force-platform would be interesting. It could take any of the values we use to select the binary. For example, from the current download at https://chromedriver.storage.googleapis.com/index.html?path=94.0.4606.61/, it could be linux64, mac64, mac64_m1, win32.

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

No branches or pull requests

2 participants