The installation of a plugin for the ibm cloud CLI fails the action if the plugin has already been installed.
Run IBM/actions-ibmcloud-cli@v1
Installing IBM Cloud CLI
/usr/local/bin/ibmcloud --version
ibmcloud 2.40.0 (e37968a5e-2025-12-09T17:44:02+00:00)
Copyright IBM Corp. 2014, 2025
Disable version checking
Installing IBM Cloud CLI plugins
/usr/local/bin/ibmcloud plugin install code-engine
Looking up 'code-engine' from repository 'IBM Cloud'...
Plug-in 'code-engine[ce] 1.58.1' found in repository 'IBM Cloud'
Plug-in 'code-engine[ce] 1.58.1' was already installed. Do you want to re-install it or not? [y/N] >
Error: The operation was canceled.
This logic would be a potential solution:
function ensure_plugin_is_up_to_date() {
echo "Checking $1 ..."
# check whether plugin is installed
if ! ibmcloud plugin show $1 -q >/dev/null; then
# install it
ibmcloud plugin install $1 -f --quiet
else
# check whether there is an update available
ibmcloud plugin update $1 -f --quiet
fi
}
It would probably be sufficent to pass -f as part of the install command
|
await exec.exec('ibmcloud', ['plugin', 'install', ...plugins]) |
The installation of a plugin for the ibm cloud CLI fails the action if the plugin has already been installed.
This logic would be a potential solution:
It would probably be sufficent to pass
-fas part of the install commandactions-ibmcloud-cli/src/main.js
Line 70 in 8623a6f