0

I am working on a feature in a specific dev container implementation. I am trying to run "az login" interactively when the container is setup. I invoked the command during a script that is run in "postStartCommand", i also tried "postAttachCommand", which did not work either.

I tried in a bash script. To run "az login" and expect the browser to open on host using the BROWSER env that vscode sets.

It does not. "az login --verbose" from within bash script returns """ No web browser is available. Fall back to device code. To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code [Code] to authenticate. """

az login from within a terminal in vscode after the devcontainer has opened works fine however. It opens a browser on the host envoronment. How can i get this functionality in the postStartCommand?

0 Answers0