Closed tlhampton13 closed 1 year ago
@tongueroo do you consider the suggested solution sufficient?
Think the suggested approach is fine.
@tlhampton13 Thanks for the detailed report and suggestions to fix it. Details in https://github.com/boltops-tools/jets/pull/651
@timlawrenz No, it quite did not. Fixed an edge case issue with the jets -h
. Details in https://github.com/boltops-tools/jets/pull/651
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
When running a custom rake task that has parameters I expect the task to execute.
JETS_ENV=development jets custom:task[0,'foo']
Current Behavior
When running a custom rake task with the following cmd line, the help message is printed instead of executing the task.
JETS_ENV=development jets custom:task[0,'foo']
In the cli.rb file the lookup() method fails to find the task in the namespaced_commands because the parameters don't match.
The value for the custom task in the namespaced_commands is
custom:task[arg1,arg2]
and the value of the full_command iscustom:task[0,'foo']
.The line 138 of cli.rb fails because the parameter portion of the command does not match.
rake_task_found = Jets::Commands::RakeCommand.namespaced_commands.include?(full_command)
Step-by-step reproduction instructions
Code Sample
Solution Suggestion
Replace 138 cli.rb
rake_task_found = Jets::Commands::RakeCommand.namespaced_commands.include?(full_command)
with