github / github/copilot-cli

PowerShell commands failing

未關閉
#1,147 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
area:platform-windows
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the bug

#196 talked about this issue, but it was closed with the claim that v0.0.335 fixed the issue, but it's still happening for me.

### Affected version

_No response_

### Steps to reproduce the behavior

1. In the interactive prompt type "Run Get-ChildItem"

### Expected behavior

The command is executed. Instead of this:

```text
❯ Run Get-ChildItem

✓ List files in the current directory
$ Get-ChildItem
└ 1 line...

● Let me check the output:

Read shell output:
Waiting up to 10 seconds for command output
Invalid session ID: 0. Please supply a valid session ID to read output from.
```

### Additional context

If I do "!Get-ChildItem" it works, but my profile is loaded and produces an error.

```text
Line | │
│ 9 | Set-PSReadLineOption @PSReadLineOptions │
│ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ │
│ | The predictive suggestion feature cannot be enabled because the console output doesn't support virtual │
│ terminal │
│ | processing or it's redirected.
```

Yet the command does run. Still, I suspect you need to use `-NoProfile` when spawning pwsh.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。