Skip to content

Commit 589843b

Browse files
author
Philip Schmidt
committed
when user specifies force update, update the core cli by force
1 parent 5e5a83b commit 589843b

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

linux-installer/idt-installer

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ function install_bx {
351351
log "IBM Cloud 'bx' CLI install finished."
352352
else #-- Upgrade
353353
log "Updating existing IBM Cloud 'bx' CLI..."
354-
bx update
354+
if [[ "$FORCE" == true ]]; then
355+
bx update -f
356+
else
357+
bx update
358+
fi
355359
fi
356360
log "Running 'bx --version'..."
357361
bx --version

windows-installer/idt-win-installer.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,14 @@ function add_to_path {
239239
function install_bx() {
240240
if( get-command bx -erroraction 'silentlycontinue') {
241241
Write-Output "ibmcloud already installed"
242-
bx update
242+
if( $Global:FORCE ){
243+
# User wants forced update
244+
bx update -f
245+
} else {
246+
# User will be prompted if they want to update
247+
bx update
248+
}
249+
243250
} else {
244251
log "Installing 'ibmcloud' CLI for Windows..."
245252
$url = $Global:IDT_INSTALL_BMX_URL + "/powershell"

0 commit comments

Comments
 (0)