Fix azd ext install --force to reinstall when version matches
#6435
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
--forceflag was ignored when the installed version matched the target version, preventing recovery when extension files were missing but metadata indicated installation.Reproduction:
Changes
Core logic (
extension.go:628): Check--forceflag before skipping same-version installsFlag description (
extension.go:536): Updated help text to reflect reinstall capabilityWith
--force, the extension now uses the upgrade path (uninstall + reinstall) to restore missing files.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
aka.ms./azd ./azd version -stringintconv -tests /tmp/go-build2740150305/b249/vet.cfg esourcemanager/resourcegraph/armresourcegraph@v0.9.0/build.go ified extensionInstallAction.Run to check --force flag before skipping installation when the ins-atomic x_amd64/compile --gdwarf-5 nager/appconfigu-unsafeptr=false(dns block)./azd ./azd extension source add -n test-local -t file -l /home/REDACTED/work/azure-dev/azure-dev/cli/azd/extensions/registry.json -o 64/pkg/tool/linu/tmp/go-build2740150305/b212/vet.cfg -I 1.76.0/internal/resolver/delegat-p -I 64/pkg/tool/linux_amd64/compile --gdwarf-5 grpclog -o 64/pkg/tool/linu-buildtags(dns block)/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload -tests /tmp/go-build2740150305/b296/vet.cfg 1.76.0/internal/grpclog/prefix_l-I -I 64/pkg/tool/linux_amd64/compile --gdwarf-5 ershell =0 64/pkg/tool/linu/tmp/go-build2740150305/b214/vet.cfg swit�� g/convert/util.go _3vczQfb- 64/pkg/tool/linux_amd64/compile --gdwarf-5 nal/encoding/jso-atomic p=/opt/hostedtoo-bool 64/pkg/tool/linu-buildtags(dns block)code.cloudfoundry.org/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)dario.cat/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)go.googlesource.com/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)go.lsp.dev/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)go.opentelemetry.io/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)go.starlark.net/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)go.uber.org/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)go.yaml.in/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)google.golang.org/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)gopkg.in/update-job-proxy /update-job-proxy -o br-a179c154df24 -j DOCKER-ISOLATION-STAGE-2 icrosec_e-Szigno_Root_CA_2009.pem /opt/hostedtoolc-e(dns block)westus-0.in.applicationinsights.azure.com/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload -tests /tmp/go-build2740150305/b296/vet.cfg 1.76.0/internal/grpclog/prefix_l-I -I 64/pkg/tool/linux_amd64/compile --gdwarf-5 ershell =0 64/pkg/tool/linu/tmp/go-build2740150305/b214/vet.cfg swit�� g/convert/util.go _3vczQfb- 64/pkg/tool/linux_amd64/compile --gdwarf-5 nal/encoding/jso-atomic p=/opt/hostedtoo-bool 64/pkg/tool/linu-buildtags(dns block)/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload -tests /tmp/go-build2740150305/b336/vet.cfg uf@v1.36.10/proto/checkinit.go icy.go x_amd64/compile --gdwarf-5(dns block)/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload -tests /tmp/go-build2740150305/b335/vet.cfg(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
azd ext install --forceshould force install #6413💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.