Azure / Azure/azure-cli

az container attach generate dupliate log if rediected to file

Open
#20,998 2 comments 1 reaction 0 assignees View on GitHub
act-observability-squad Container Instances Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.31.0

**Describe the bug**
when redirect command logs with --follow or attach content to a file, i found content duplicate in file, like each second it write all log to file:

```
az container attach -g mygoup -n mycontainer > file.txt
```

**To Reproduce**
create a container instance 'mycontainer' in a group 'mygoup'

execute command

```
az container attach -g mygoup -n mycontainer > file.txt
```

you will find duplicate content in file.txt of log
**Expected behavior**
found in in file the same content as i execute command without redirect to file

**Environment summary**

Linux mint 20.3
```
{
"azure-cli": "2.31.0",
"azure-cli-core": "2.31.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"azure-devops": "0.22.0"
}
```

**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.