github / github/copilot-cli

The `--config-dir=PATH` is not working as expected

オープン
#2,197 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:configuration
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

Here is my situation:

1. I have a `~/.copilot/config.json`.
2. I run `copilot` with `--config-dir .copilot` which I want to set `./.copilot` as my primary config directory.

I found that during the execution of Copilot CLI, session data is written to the ./.copilot/ folder, but `config.json` reads the contents of `~/.copilot/config.json`. That's so strange!

### Affected version

GitHub Copilot CLI 1.0.9.

### Steps to reproduce the behavior

1. Create a `~/.copilot/config.json` which assign a model to `gpt-5-mini`.
2. Create a `./.copilot/config.json` which assign a model to `claude-sonnet-4.6`.

Run `copilot --yolo --config-dir .copilot` which will load `gpt-5-mini` model.

### Expected behavior

The command arguments should take precedence over and be higher than ~/.copilot/config.json

### Additional context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。