Skip to content

[Bug]: sudo privilege not revoked after installing dependencies #38477

@alxndrsn

Description

@alxndrsn

Version

1.56.1

Steps to reproduce

  1. run npx playwright install --with-deps
  2. enter password
  3. wait for command to complete successfully
  4. check sudo privileges

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

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