Open cedricvidal opened 5 days ago
Hi @cedricvidal our team will take a look at this soon. In the meantime, I tried accessing https://github.com/cedricvidal/azd-hook-interactive-python and got a 404. I think this usually means I may not have the right permissions to view it -- if this repro repository is okay to share, would you be able to check on your side that it's set to public access? Thanks!
Hello Wei,
thanks for your quick response! My bad, the repo was private, I changed its visibility to public, you should be able to access it.
Let me know if you have any question.
Cedric
Hi @cedricvidal, thanks for updating the repro repository. I took a closer look, and it seems that azd hooks run
isn't respecting the interactive
flag. However, it does seem to work during the actual hook execution.
I modified the repro slightly to have a valid preprovision
hook:
name: azd-test
hooks:
preprovision:
shell: sh
run: ./test.sh
interactive: true
continueOnError: false
And verified azd provision
does indeed prompt:
However, just as you have noticed, azd hooks run preprovision
fails because stdin/stdout isn't attached:
I have updated the issue title based on these findings. cc: @wbreza
Output from
azd version
Runazd version
and copy and paste the output here:Describe the bug azd hooks don't get TTY in interactive mode on
linux
/sh
andlinux
/pwsh
Github repo with code to reproduce https://github.com/cedricvidal/azd-hook-interactive-python
To Reproduce
On a MacOS or Windows machine
mcr.microsoft.com/devcontainers/python:1-3.12-bullseye
)azd hooks run test-sh
failsazd hooks run test-py
failsazd hooks run test-ps
fails silentlyOn a Windows machine
azd hooks run test-sh
failsazd hooks run test-py
failsazd hooks run test-ps
succesfully asks user for "? Input" and prints the valueExpected behavior On Windows and MacOS, within a Linux Dev Container or on the host
azd hooks run test-sh
succesfully asks user for "? Input" and prints the valueazd hooks run test-py
succesfully asks user for "? Input" and prints the valueazd hooks run test-ps
succesfully asks user for "? Input" and prints the valueEnvironment
VS Code: Version: 1.93.1 Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40 azd version 1.10.1 (commit 31409a33266fb4a5fdbb644bc83988e725d6c7c9)