Skip to content

Bug: Commands cannot accept many paths #2148

Description

@MGatner

Describe the bug
Because CLI commands are actually routed their parameters go through some routing and filtering making it impossible to pass certain characters as a parameter. Of note that I ran into was trying to use a command that take a files path - the "/"s and "-"s cause it to be filtered and never arrives in $params.

CodeIgniter 4 version
Latest develop branch

Affected module(s)
CLI Commands

Expected behavior, and steps to reproduce if appropriate
Create a simple commands that calls var_dump($params) in run(). Call it:
php spark test:command /usr/bin/myfile.txt
Response is empty array.

Context

  • OS: Linux
  • Web server Apache
  • PHP version 7.2+

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugVerified issues on the current code behavior or pull requests that will fix them

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions