New issue
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
Add --force flag to new command #1115
Conversation
I've noticed |
@@ -3,12 +3,12 @@ | |||
module Jekyll | |||
module Commands | |||
class New < Command | |||
def self.process(args) | |||
def self.process(args, options = {}) | |||
raise ArgumentError.new('You must specify a path.') if args.empty? | |||
|
|||
new_blog_path = File.expand_path(args.join(" "), Dir.pwd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your tests, did args
include --force
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, flags were properly separated from args. If you ran the command with only the force flag args
would simply be an empty array. Commander is nice enough to ensure this in their specs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for confirming.
This looks good to me. @mattr-, if everything checks out for you as well, merge it in! :) |
Nice work @clang1234 ! Thanks! ❤️ 🚢ed |
Add --force flag to new command
Thanks guys! Glad I could help. |
As suggested in #1104, I've added a
--force
command to thenew
subcommand.