azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

[Issue] azd template list in DevCenter mode fails silently when not logged in

Open MaxHorstmann opened this issue 1 year ago • 0 comments

  • [x] Make sure you've installed the latest version using instructions in the wiki

Output from azd version azd version 1.10.3 (commit 0595f33fe948ee6df3da492567e3e7943cb9a733)

Describe the bug In DevCenter mode, azd template list (and likely other commands) fails silently when not logged in.

To Reproduce

$ azd config set platform.type devcenter
$ azd template list         
Name      Source    Repository Path

... huh? where are my templates?

$ azd template list --debug
2024/10/24 09:22:52 main.go:56: azd version: 1.10.3 (commit 0595f33fe948ee6df3da492567e3e7943cb9a733)
2024/10/24 09:22:52 main.go:214: using cached latest version: 1.10.3 (expires on: 2024-10-24T15:00:59Z)
2024/10/24 09:22:52 middleware.go:108: running middleware 'debug'
2024/10/24 09:22:52 middleware.go:108: running middleware 'ux'
2024/10/24 09:22:52 middleware.go:108: running middleware 'telemetry'
2024/10/24 09:22:52 telemetry.go:43: TraceID: b996e83f87a5047e2e662147be20819d
  |       | Retrieving templates...2024/10/24 09:22:52 template_manager.go:173: failed to create source: unable to create template source 'devcenter': invalid template source type, 'devcenter', not logged in, run `azd auth login` to login
Name      Source    Repository Path

Oh - I'm not logged in.

$ azd auth login
Logged in to Azure.
$ azd template list
<works>

Expected behavior azd template list should already display "not logged in, run azd auth login to login"

Environment MacOS 15.0.1 (24A348)

MaxHorstmann avatar Oct 24 '24 13:10 MaxHorstmann