Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az can't be invoked by Start-Process since 2.40.0 #24005

Open
jiasli opened this issue Sep 26, 2022 · 1 comment
Open

az can't be invoked by Start-Process since 2.40.0 #24005

jiasli opened this issue Sep 26, 2022 · 1 comment
Assignees
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team Core CLI core infrastructure feature-request
Milestone

Comments

@jiasli
Copy link
Member

jiasli commented Sep 26, 2022

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 (#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.

@yonzhan yonzhan added Core CLI core infrastructure Azure CLI Team The command of the issue is owned by Azure CLI team feature-request labels Sep 26, 2022
@yonzhan yonzhan added this to the Backlog milestone Sep 26, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Sep 26, 2022

One limitation caused by az.ps1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team Core CLI core infrastructure feature-request
Projects
None yet
Development

No branches or pull requests

2 participants