chore: update npx playwright uninstall docs (#23552)
This commit is contained in:
parent
aab322f2a1
commit
85be65b07b
|
|
@ -992,7 +992,7 @@ Playwright keeps track of the clients that use its browsers. When there are no m
|
|||
|
||||
To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable.
|
||||
|
||||
### Remove browsers
|
||||
### Uninstall browsers
|
||||
|
||||
This will remove the browsers (chromium, firefox, webkit) of the current Playwright installation:
|
||||
|
||||
|
|
|
|||
|
|
@ -175,13 +175,13 @@ Examples:
|
|||
|
||||
program
|
||||
.command('uninstall')
|
||||
.description('Removes browsers used by this version of Playwright from the system (chromium, firefox, webkit, ffmpeg). This does not include branded channels.')
|
||||
.option('--all', 'Removes all browsers used by any Playwright version from the system.')
|
||||
.description('Removes browsers used by this installation of Playwright from the system (chromium, firefox, webkit, ffmpeg). This does not include branded channels.')
|
||||
.option('--all', 'Removes all browsers used by any Playwright installation from the system.')
|
||||
.action(async (options: { all?: boolean }) => {
|
||||
await registry.uninstall(!!options.all).then(({ numberOfBrowsersLeft }) => {
|
||||
if (!options.all && numberOfBrowsersLeft > 0) {
|
||||
console.log('Successfully uninstalled Playwright browsers for the current Playwright installation.');
|
||||
console.log(`There are still ${numberOfBrowsersLeft} browsers left, used by other Playwright installations.\nTo uninstall Playwright browsers for all versions, re-run with --all flag.`);
|
||||
console.log(`There are still ${numberOfBrowsersLeft} browsers left, used by other Playwright installations.\nTo uninstall Playwright browsers for all installations, re-run with --all flag.`);
|
||||
}
|
||||
}).catch(logErrorAndExit);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue