grunt-cli
grunt-cli copied to clipboard
gruntfile option is part of grunt.option.flags()
Since release 1.3.x the --gruntfile option is part of grunt.option.flags().
This is causing issues while running grunt shell or similar tasks as an unknown option is being passed to an operation that might / will return an error.
Fragment of the grunt-shell task:
{
phpunit:
{
command:'vendor/bin/phpunit ' + grunt.option.flags()
}
}
Error reported by PHPUnit:
Running "shell:phpunit" (shell) task
PHPUnit 7.4.3 by Sebastian Bergmann and contributors.
unrecognized option --gruntfile
Warning: Command failed: vendor/bin/phpunit --gruntfile=/home/redaxmedia/PhpstormProjects/redaxscript/gruntfile.js
Use --force to continue.
Verbose information:
grunt phpunit --verbose
Initializing
Command-line options: --verbose, --gruntfile=/home/redaxmedia/PhpstormProjects/redaxscript/gruntfile.js