github / github/copilot-cli

unreconized flag for Grep command make by cli on request analyze

未关闭
#1,931 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:tools
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

Hi everyone,

when i make a request like control my code on upgrade framework version, copilot make some work like grep request in his analyze.

In the list of grep request, i have the `Grep "-> XXXX` (example : Grep "->name\(" in directory)) that return `rg: unrecognize flag ->`.

one of the possible correction is to add dubble `--` before the string `"->name\("` like : `rg -- "->name\(" in directory))`.

thanks for your work on github cli.

### Affected version

GitHub Copilot CLI 1.0.2.

### Steps to reproduce the behavior

1. create laravel project on version 11
2. make an upgrade to version 12 : change laravel version on composer.json to `^12.0`. run composer update on terminal.
3. on terminal run copilot
4. request copilot cli to confirm your code have all requested update regard the upgrade guide on url : https://laravel.com/docs/12.x/upgrade

### Expected behavior

The user has upgraded their Laravel project to version 12 and wants me to check the Laravel 12 upgrade guide and validate their project against it. Let me start by fetching the upgrade
guide and exploring the project structure.

● Fetching web content: https://laravel.com/docs/12.x/upgrade
└ Contents of https://laravel.com/docs/12.x/upgrade:

● Read composer.json
└ 64 lines read

● List directory .
└ 25 files found

◐ Now let me analyze the upgrade guide against the project. I need to check several things:

1. Dependencies (High Impact) - ✅ `laravel/framework` is `^12.0`, `phpunit/phpunit` is `^11.0`, `pestphp/pest` is `^3.0` - looks good.

2. Models and UUIDv7 (Medium Impact) - Need to check if any models use `HasUuids` or `HasVersion7Uuids`.

3. Carbon 3 (Low Impact) - Need to check if there's any Carbon 2.x specific usage.

I should also scan for several other low-impact changes: `Concurrency::run` patterns, container resolver implementations, `image` validation rules that might handle SVGs, filesystem
configuration for the local disk, Schema inspection across multiple databases, and any `mergeIfMissing` calls on request objects. Let me search the codebase for these patterns.

● Let me now scan the codebase for all the breaking changes mentioned in the upgrade guide.

● Grep "HasUuids|HasVersion7Uuids|HasVersion4Uuids" (directoryl\myapp\app)
└ No matches found

● Grep "Concurrency::run" (directoryl\myapp\app)
└ No matches found

● Grep "mergeIfMissing" (directoryl\myapp\app)
└ No matches found

● Grep "\bimage\b" in *Request.php (directoryl\myapp\app)
└ No matches found

● Grep "Schema::(getTables|getViews|getTypes|getTableListing)" (directoryl\myapp\app)
└ No matches found

● Grep "DatabaseTokenRepository|setConnection|withTablePrefix|getTablePrefix|setTablePrefix" (directoryl\myapp\app)
└ No matches found

● Grep "Storage::disk\(.*local" in *.php (directoryl\myapp)
└ No matches found

● List directory config
└ 14 files found

◐ Good - none of the medium/low impact changes seem to affect this project. Let me also check:
1. The filesystems config for the `local` disk root path issue
2. Any Carbon-specific usage that might break with Carbon 3
3. The `image` validation rule in general (not just in Request files)
4. Any route name conflicts
5. Check if the config files are up to date (Laravel 12 might need config changes)

● Read config\filesystems.php
└ 73 lines read

● Grep "Carbon|carbon" in *.php (directoryl\myapp\app)
└ No matches found

● Grep "'image'|\"image\"|\\|image\\|" in *.php (directoryl\myapp\app)
└ 6 lines found

● Grep "resolve\(.*::class\)" in *.php (directoryl\myapp\app)
└ No matches found

✗ Grep "->name\(" in *.php (directoryl\myapp\routes)
└ rg: unrecognized flag ->

### Additional context

operating system : windows
cpu : x68_64
terminal : visual studio code terminal
shell : powershell

贡献指南

打开贡献指南

调研方向

Start by reproducing the generated Grep request from the Laravel upgrade scenario on Windows PowerShell, especially the pattern beginning with `->`. Trace the CLI's Grep command handling and locate existing command-generation tests. Done means patterns beginning with a hyphen no longer produce an `rg: unrecognized flag` error and regression coverage confirms the behavior.

由索引模型根据 Issue 内容生成。

评估

技术栈
powershell, shell
领域
cli, tooling
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。