From d00e38a0387558773d4b32d97fb124f486a0db99 Mon Sep 17 00:00:00 2001 From: rkpiii Date: Thu, 4 Jan 2024 17:02:34 +0100 Subject: [PATCH] =?UTF-8?q?[11744]=20handle=20missing=20hyphen=20when=20at?= =?UTF-8?q?tempting=20to=20run=20self-update=E2=80=A6=20(#11775)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [11744] handle missing hyphen when attempting to run self-update command * fix: [1744] silently fix the "self update" command --- src/Composer/Command/SelfUpdateCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Composer/Command/SelfUpdateCommand.php b/src/Composer/Command/SelfUpdateCommand.php index 45db77e52..26d9f7546 100644 --- a/src/Composer/Command/SelfUpdateCommand.php +++ b/src/Composer/Command/SelfUpdateCommand.php @@ -156,6 +156,10 @@ EOT return $this->rollback($output, $rollbackDir, $localFilename); } + if ($input->getArgument('command') === 'self' && $input->getArgument('version') === 'update') { + $input->setArgument('version', null); + } + $latest = $versionsUtil->getLatest(); $latestStable = $versionsUtil->getLatest('stable'); try {