playwright
playwright copied to clipboard
[Bug]: sudo privilege not revoked after installing dependencies
Version
- 1.56.1
- 1.57.0
Steps to reproduce
- run
npx playwright install --with-deps - enter password
- wait for command to complete successfully
- check
sudoprivileges
Expected behavior
sudo privilege should be revoked immediately after it was used (e.g. sudo -k)
would be observable as:
$ sudo -n true; echo $?
1
Actual behavior
$ npx playwright install --with-deps
Installing dependencies...
Switching to root user to install dependencies...
[sudo] password for user:
...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo -n true; echo $?
0
Additional context
No response
Environment
System:
OS: Linux Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
Container: Yes
Binaries:
Node: 22.21.0
npm: 10.9.4
Languages:
Bash: 5.2.21 - /usr/bin/bash
npmPackages:
@playwright/test: 1.56.1
We discussed it with the team, but are hesitant to change things because it might break existing script usage that depends on the session not being revoked. Let's collect upvotes, if many people want this change we can reconsider.