github / github/copilot-cli

Plugin install fails: pluginRoot prepended to source path causing doubled directory segment

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

説明

## Bug Report

### Summary
When installing a plugin from the `microsoft-skills` marketplace (e.g. `azure-skills@skills`), the CLI constructs an incorrect path by joining `pluginRoot` with a `source` value that already contains the full path prefix. This produces a doubled directory segment and the install fails with a directory-not-found error.

### Steps to Reproduce
1. Run `/plugin` and install `azure-skills@skills` from the `microsoft-skills` marketplace.
2. Observe the error: directory not found.

### Expected Behavior
Plugin installs successfully. The resolved path should be:
```
~/.cache/copilot/marketplaces/microsoft-skills/.github/plugins/azure-skills
```

### Actual Behavior
The CLI looks for the plugin at:
```
~/.cache/copilot/marketplaces/microsoft-skills/.github/plugins/.github/plugins/azure-skills
```

### Root Cause (Observed)
In `marketplace.json` for `microsoft-skills`, the `metadata.pluginRoot` is set to `./.github/plugins` and each plugin entry's `source` field is `./.github/plugins/` (the full path from repo root). The CLI appears to join `pluginRoot + source` rather than treating `source` as repo-root-relative, resulting in the segment being appended twice.

Relevant `marketplace.json` snippet:
```json
{
"metadata": {
"pluginRoot": "./.github/plugins"
},
"plugins": [
{
"name": "azure-skills",
"source": "./.github/plugins/azure-skills"
}
]
}
```

### Workaround
Manually create a symlink at the doubled path pointing to the real plugin directory:
```bash
mkdir -p ~/.cache/copilot/marketplaces/microsoft-skills/.github/plugins/.github/plugins
ln -sf ~/.cache/copilot/marketplaces/microsoft-skills/.github/plugins/azure-skills ~/.cache/copilot/marketplaces/microsoft-skills/.github/plugins/.github/plugins/azure-skills
```

### Environment
- OS: Linux
- Marketplace: `microsoft-skills` (marketplace version 1.0.0)
- Plugin: `azure-skills` (plugin version 1.0.1)
- Copilot CLI version: 1.0.10

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

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

評価

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

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

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