Skip to content

Commit 7549558

Browse files
authored
chore(webkit): make sure npx command is used from the wsl container (#38071)
1 parent 352a360 commit 7549558

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/playwright-core/bin/install_webkit_wsl.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if [ ! -f "/home/$Username/node/bin/node" ]; then
2323
mkdir -p /home/$Username/node
2424
curl -fsSL https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz -o /home/$Username/node/node-v22.17.0-linux-x64.tar.xz
2525
tar -xJf /home/$Username/node/node-v22.17.0-linux-x64.tar.xz -C /home/$Username/node --strip-components=1
26-
echo 'export PATH=/home/$Username/node/bin:$PATH' >> /home/$Username/.bashrc
26+
sudo -u $Username echo 'export PATH=/home/$Username/node/bin:\`$PATH' >> /home/$Username/.profile
2727
fi
2828
/home/$Username/node/bin/node cli.js install-deps webkit
2929
sudo -u $Username PLAYWRIGHT_SKIP_BROWSER_GC=1 /home/$Username/node/bin/node cli.js install webkit

tests/library/playwright.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ if (mode === 'service2') {
8181
if (channel === 'webkit-wsl') {
8282
connectOptions = { wsEndpoint: 'ws://localhost:3777/' };
8383
webServer = {
84-
command: 'wsl -d playwright -- npx playwright run-server --port=3777',
84+
command: 'wsl.exe -d playwright -- bash -lc \'/home/pwuser/node/bin/npx playwright run-server --port=3777\'',
8585
url: 'http://localhost:3777',
86-
reuseExistingServer: !process.env.CI,
8786
};
8887
}
8988

0 commit comments

Comments
 (0)