Output from azd version
Run azd version and copy and paste the output here:
azd version 1.11.0 (commit 5b92e0687e1fa96dfc8292f4b900c0c58610b6a5)
Describe the bug
'pwsh' is not recognized as an internal or external command,
operable program or batch file.
WARNING: 'postprovision' hook failed with exit code: '1', Path: '.\scripts\write_env.ps1'. : exit code: 1
Execution will continue since ContinueOnError has been set to true.
To Reproduce
On a machine with powershell 5 command, run a sample that uses powershell post provision hooks, such as: https://github.com/azureai-samples/azureai-basic-python
Expected behavior
It took me a while to realize that pwsh is for powershell 7 and that powershell is for powershell 5, could azd check for the presence of pwsh and if it doesn't exist:
- fallback to using ````powershell``` to run the command
- guide users to install powershell 7
Environment
Windows, VS Code (latest), Python
* Language name and version
* IDE and version : [e.g. Visual Studio 16.3]
Additional context
Add any other context about the problem here.
Output from
azd versionRun
azd versionand copy and paste the output here:Describe the bug
To Reproduce
On a machine with powershell 5 command, run a sample that uses powershell post provision hooks, such as: https://github.com/azureai-samples/azureai-basic-python
Expected behavior
It took me a while to realize that
pwshis for powershell 7 and thatpowershellis for powershell 5, could azd check for the presence ofpwshand if it doesn't exist:Environment
Windows, VS Code (latest), Python
Additional context
Add any other context about the problem here.