`az` can't be invoked by `Start-Process` since 2.40.0
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
Before Azure CLI 2.40.0, `az` can be invoked by `Start-Process`:
```
> Start-Process -FilePath az -NoNewWindow -ArgumentList version -Wait
{
"azure-cli": "2.40.0",
"azure-cli-core": "2.40.0",
"azure-cli-telemetry": "1.0.8",
"extensions": {
"account": "0.2.3"
}
}
```
The entry script was migrated from `az.cmd` to `az.ps1` (https://github.com/Azure/azure-cli/pull/23514) in 2.40.0. `az` can no longer be invoked by `Start-Process`:
```
> Start-Process -FilePath az -NoNewWindow -ArgumentList version -Wait
Start-Process: This command cannot be run due to the error: %1 is not a valid Win32 application.
```
This is because `Start-Process` can't invoke a `ps1` script in a separate process.
Contributor guide
Assessment
This issue has not been assessed yet.