github / github/copilot-cli

Github Copilot CLI incorrectly says data input to an awk command is in a different path

Đang mở
#1,256 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:permissions area:tools
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the bug

When using github copilot cli, I'll get annoying popups where it claims copilot is trying to access directories outside the workspace, when it's nothing close to a directory, it's the data from an AWK command.

### Affected version

GitHub Copilot CLI 0.0.400.

### Steps to reproduce the behavior

It's difficult to get the specific steps, but here's a command that will cause the nuisance trip.

```shell
$ for phase in {1..21}; do echo "=== Phase $phase ==="; grep -A 2 "^/// Phase $phase:"
controller.cpp | head -3; grep "^TEST_F"
controller.cpp | awk -v p=$phase 'BEGIN{start=0} /Phase
'"$phase"'/{start=1} start && /Phase [0-9]+/ && !/Phase '"$phase"'/{start=0} start' | wc -l | xargs echo " Tests:";
echo ""; done
```

It incorrectly thinks `'/{start=1} start && /Phase [0-9]+/ && !/Phase '"$phase"'/{start=0} start'` is a path.

### Expected behavior

No nuisance trips

It looks like whatever is parsing shell commands is doing a terrible time at it.

### Additional context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.