Skip to content

unreconized flag for Grep command make by cli on request analyze #1931

@filipewellpack

Description

@filipewellpack

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions