Add interactive selector to azd env select when no environment specified#6347
Merged
Conversation
- Modified newEnvSelectCmd to accept 0 or 1 arguments - Added console parameter to envSelectAction for interactive prompts - Implemented environment selection prompt when no argument is provided - Maintains backward compatibility with explicit environment argument - Shows helpful error message when no environments exist Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
- Updated TestUsage snapshot to reflect optional environment argument - Updated TestFigSpec autocomplete spec with isOptional flag Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
Make error message more explicit by including <environment-name> placeholder Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add CLI selector to azd env select command
Add interactive selector to Dec 10, 2025
azd env select when no environment specified
vhvb1989
marked this pull request as ready for review
December 10, 2025 03:31
vhvb1989
requested review from
JeffreyCA,
hemarina,
rajeshkamal5050,
tg-msft,
trangevi,
wbreza and
weikanglim
as code owners
December 10, 2025 03:31
vhvb1989
approved these changes
Dec 10, 2025
weikanglim
approved these changes
Dec 10, 2025
Member
|
/check-enforcer override |
vhvb1989
enabled auto-merge (squash)
December 12, 2025 18:49
This was referenced Dec 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Running
azd env selectwithout arguments required users to first runazd env list, then copy-paste the environment name. This adds an interactive picker when no argument is provided.Changes
azd env selectto accept 0 or 1 arguments (previously required exactly 1)console.Select()when no argument providedBehavior
Before:
After:
Explicit environment argument continues to work unchanged:
azd env select devWarning
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 env select --help -goversion go1.25.4 -c=4 -nolocalimports -importcfg /tmp/go-build417905578/b936/importcfg -pack /tmp/go-build417905578/b936/_testmain.go -o xy0hPX0R_ pkg/mod/github.c-ifaceassert x_amd64/vet -p g/grpc/balancer/-o -lang=go1.20 x_amd64/vet(dns block)/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd env list x_amd64/vet -W I-novOX3- e-dev/cli/azd/in-ifaceassert x_amd64/vet . AADBbUda53gb --64 x_amd64/vet -I rg/x/text@v0.31.-errorsas cfg x_amd64/vet -pthread /azure-dev/cli/a--norc -fmessage-length--noprofile x_amd64/vet(dns block)/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload x_amd64/vet -W m6ga06Zhy e-dev/cli/azd/pk-ifaceassert x_amd64/vet . /trace --64 x_amd64/vet -qui�� om/tmc/langchain-errorsas cfg x_amd64/vet /tmp/go-build282bash /azure-dev/cli/a--norc x86_64-linux-gnu--noprofile x_amd64/vet(dns block)code.cloudfoundry.org/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(dns block)dario.cat/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(dns block)go.googlesource.com/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(dns block)go.opentelemetry.io/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(dns block)go.uber.org/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(dns block)go.yaml.in/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(dns block)google.golang.org/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(dns block)gopkg.in/update-job-proxy /update-job-proxy -o br-54cf780eb562 -j DROP si_-_Surum_1.pem bash(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 x_amd64/vet -W m6ga06Zhy e-dev/cli/azd/pk-ifaceassert x_amd64/vet . /trace --64 x_amd64/vet -qui�� om/tmc/langchain-errorsas cfg x_amd64/vet /tmp/go-build282bash /azure-dev/cli/a--norc x86_64-linux-gnu--noprofile x_amd64/vet(dns block)/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload x_amd64/vet -W g_.a ache/go/1.25.4/x-ifaceassert x_amd64/vet . g/grpc/balancer/-atomic --64 x_amd64/vet -o vI3C4Mw7k cfg x_amd64/vet -p /azure-dev/cli/a--norc -lang=go1.25 x_amd64/vet(dns block)/home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd /home/REDACTED/work/azure-dev/azure-dev/cli/azd/azd telemetry upload x_amd64/vet -W g_.a e-dev/cli/azd/pk-ifaceassert x_amd64/vet . er --64 x_amd64/vet -o 3yaG8H3ma om/pelletier/go-github.com/azure/azure-dev/cli/azd/extensions/microsoft.azd.extensions/internal/--norc h -p uments -lang=go1.22 x_amd64/vet(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
azd env selectcommand #3439💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.