Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
374 stars 1.16k forks source link

[az confcom acipolicygen] Command raises a sys.exit() after generation of the policy #7683

Open hprabh opened 1 month ago

hprabh commented 1 month ago

Describe the bug

The az confcom acipolicygen command raises a sys.exit(0) after the generation of the policy. Using scripts to invoke the command causes the process to exit, unless launched in a subprocess.

Related command

az confcom acipolicygen

Errors

N/A

Issue script & Debug output

N/A

Expected behavior

THe process should not exit after the command has run successfully. The command should just return the value instead of calling sys.exit()

Environment Summary

azure-cli 2.59.0 *

core 2.59.0 * telemetry 1.1.0

Extensions: aks-preview 0.5.146 arcappliance 0.2.32 azure-devops 0.26.0 cleanroom 0.0.1 confcom 0.5.0a1 connectedk8s 1.3.20 k8s-extension 1.4.2 managedccfs 0.2.0 providerhub 0.2.0

Dependencies: msal 1.27.0 azure-mgmt-resource 23.1.0b2

Python location '/opt/az/bin/python3' Extensions directory '/home/hprabh/.azure/cliextensions' Development extension sources: /home/hprabh/code/azure-cleanroom

Additional context

No response

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.