Open softchris opened 2 months ago
Thank you for opening this issue, we will look into it.
For progress update, add it to feature request list. For silent mode, it's not possible.
az
exits when installing MSI; otherwise, some files are still in use and the installation fails. See https://github.com/Azure/azure-cli/issues/22741. If we use silent mode, the user won't be able to know whether the installation has finished.az upgrade
also support update extensions by using --all
option.
When I use az upgrade --all
to upgrade extesions. It take a lot of time to perform version checking one-by-one.
Since we do have installed version list and available version list. Should can metadata rather than check online for each extensions.
I don't use az upgrade --all
now. Use script is faster
remote_versions=$(az extension list-available --query "[?installed].{name:name, version:version}")
local_versions=$(az extension list --query "[].{name:name, installed_version:version}")
versions=$(jq -n --argjson local "$local_versions" --argjson remote "$remote_versions" '
[$local, $remote] |
transpose |
map({
name: .[0].name,
installed_version: .[0].installed_version,
version: .[1].version
})
')
outdated=$(echo "$versions" | jq -r '.[] | select(.installed_version != .version) | .name')
if [ "$outdated" == "" ];
then
echo "No outdated azcli extensions found."
else
for name in $(echo "$outdated" | awk '{gsub(/\\r\\n/,RS)} 1'); do
echo az extension update --name "$name" --allow-preview true --verbose
az extension update --name "$name" --allow-preview true --verbose
done
fi
Related command az upgrade
Is your feature request related to a problem? Please describe.
I want to see progress update when running az upgrade, right now it just looks stuck for 2 min
Also another thing, and quite annoying, is that it pops up an "install window" where it asks me to click next.. I didn't expect this Window and I only saw it by mistake. Can't it install an MSI in a silent mode without UI so it stays in the terminal, I don't want to be yanked out of the terminal experience when upgrading az cli.
Describe the solution you'd like
An improved experience would be:
Also, please run MSI install in terminal only, don't pop open an install Window
Thank you for considering
Describe alternatives you've considered
Additional context