Azure / Azure/azure-cli

az storage-blob upload batch fails yet exitcode 0

Open
#22,708 2 comments 3 reactions 1 assignee Claimed by @evelyn-ys View on GitHub
act-codegen-extensibility-squad Auto-Assign customer-reported Storage
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug
As described in #21477
`az storage blob upload-batch` gives errors when blob already exists and `--overwrite` is absent.

Yet the exitcode is still `0` indicating `success`. Someone might not pick up on these errors.

**Command Name**
`az storage blob upload-batch`

**Errors:**
![image](https://user-images.githubusercontent.com/17491881/171604676-0b5eab6c-7e76-4da7-9486-087d0eaf5f07.png)

![image](https://user-images.githubusercontent.com/17491881/171605391-722af4ec-0b89-4b8c-aec0-426c75276559.png)

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- `az storage blob upload-batch --account-key {} -s {} -d {} --account-name {}`
- `az storage blob upload-batch --account-key {} -s {} -d {} --account-name {}`
- `$LASTEXITCODE`

## Expected Behavior
exitcode != 0

## Environment Summary
```
Windows-10-10.0.19043-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.37.0

Extensions:
account 0.2.2
application-insights 0.1.16
azure-devops 0.23.0

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
```
## Additional Context

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.