We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tenant aware command with argument with spaces is broken.
artisan tenants:run "make:company-plugin-resource user 'change email request'" --tenants=01JG6F1TDYG9075VK6H52WZ9QE -tokens: array:5 [ 0 => "make:company-plugin-resource" 1 => "user" 2 => "'change" 3 => "email" 4 => "request'" ]
It splits into many arguments
this fix it
// Convert string command to array $subCommand = $this->explodeIgnoringQuotes($commandName); function explodeIgnoringQuotes($input) { preg_match_all('/[^\s"\']+|"(.*?)"|\'(.*?)\'|`(.*?)`/', $input, $matches); $result = array_map(function ($match) { return trim($match, "\"'`"); }, array_filter(array_merge($matches[0]))); return $result; }
With this it works with:
Run a command with argument with space
artisan tenants:run "make:company-plugin-resource user 'change email request'" --tenants=01JG6F1TDYG9075VK6H52WZ9QE artisan tenants:run 'make:company-plugin-resource user "change email request"' --tenants=01JG6F1TDYG9075VK6H52WZ9QE
Run command with the right arguments
8.4
dev-master
The text was updated successfully, but these errors were encountered:
tenants:run
stancl
No branches or pull requests
Bug description
Run tenant aware command with argument with spaces is broken.
It splits into many arguments
this fix it
With this it works with:
Steps to reproduce
Run a command with argument with space
Expected behavior
Run command with the right arguments
Laravel version
8.4
stancl/tenancy version
dev-master
The text was updated successfully, but these errors were encountered: