Claus Ibsen created CAMEL-26749:
-----------------------------------
Summary: camel-jbang - doctor: an upgraded web install reports a
conflict, and no installation is marked active
Key: CAMEL-26749
URL: https://issues.apache.org/jira/browse/CAMEL-26749
Project: Camel
Issue Type: Bug
Components: camel-jbang
Reporter: Claus Ibsen
Assignee: Claus Ibsen
Fix For: 4.24.0
Two bugs in the installation check of {{camel doctor}}, for a Camel CLI
installed with the web installer ({{install.sh}}):
# *Every upgrade reports a conflict.* The web installer keeps the previous
version directories after an upgrade (as the docs say), and {{camel doctor}}
counts each of them as an installation. After upgrading 4.22.2 to 4.23.0 it
reports "Found 2 Camel CLI installations", prints the "more than one Camel CLI
installation" warning, and exits with 1, though there is only one installation.
# *No installation is marked active.* The active installation is the first
{{camel}} on {{PATH}}, which for the web installer is the symlink
{{~/.local/bin/camel}}. It is compared with the version directories without
following the link, so it never matches, and no installation gets {{<- active}}.
Reproduced with 4.23.0:
{code}
Installs: Found 2 Camel CLI installations
.../camel-cli/versions/4.23.0 (WEB_INSTALLER)
.../camel-cli/versions/4.22.2 (WEB_INSTALLER)
Warning: more than one Camel CLI installation was found. ...
{code}
Fix: count the version directories of the web installer as one installation (a
conflict is still reported next to another installation, such as Homebrew), and
follow the symlinks of the {{camel}} found on {{PATH}} (only of the file
itself, at most 16).
The unit tests passed the real {{camel.sh}} path as the active one, which hid
the second bug.
_Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)