-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
It always bugs me that I have to re-run my previous WP-CLI command when it detected & installed an auto-update.
That's because of this line in Runner::auto_check_update():
Lines 2033 to 2036 in 28c97a9
| // Looks like an update is available, so let's prompt to update. | |
| WP_CLI::run_command( [ 'cli', 'update' ] ); | |
| // If the Phar was replaced, we can't proceed with the original process. | |
| exit; |
I'm wondering: can't we just spin up the new Phar with the originally passed arguments in a subprocess?
This way, the user would get the benefit of the new features without the hassle of having to manually re-run the previous command.
Alternatively or additonally: pass --yes to cli update by default to disable the confirmation prompt (of course this should be configurable with an env var).
Copilot