Azure / Azure/azure-cli

az kusto script create should return exit code > 0 when there are errors

Open
#28,234 1 comment 0 reactions 0 assignees View on GitHub
Kusto Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
```
az kusto script create --cluster-name $clusterName `
--database-name $databaseName `
--name $nameTable `
--resource-group $resourceGroupName `
--script-content $qCreateTable `
--force-update-tag $guid
```
![image](https://github.com/Azure/azure-cli/assets/3539908/69cafcd8-f24b-45e1-9624-edba8ea102c1)

**Is your feature request related to a problem? Please describe.**
Pipeline execution is successful when there are errors in running the command.

**Describe the solution you'd like**
Command should return non-zero code when there are errors.

**Describe alternatives you've considered**
I'd have to redirect standard error to a file and grep the results for "ERROR" then set error code in the script?

**Additional context**
Setting "Fail on Standard Error" doesn't help, because warnings are also sent to standard error.
The goal is for the task to fail on errors, but succeed on Warnings.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.