-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Fix bitters cli with custom path #191
base: master
Are you sure you want to change the base?
Fix bitters cli with custom path #191
Conversation
In case of a custom path used for Bitters installation, `remove` or `reset` commands were useless as not aware of this path.
Running `bitters install --path foo` outputs "Bitters files installed to "foo/base/base" when it should show "foo/base" only.
@@ -16,11 +16,12 @@ def install | |||
puts "Bitters files already installed, doing nothing." | |||
else | |||
install_files | |||
puts "Bitters files installed to #{install_path}/base" | |||
puts "Bitters files installed to #{install_path}/" |
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.
Do not write to stdout. Use Rails' logger if you want to log.
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.
We're not in rails, so this is fine
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.
I would remove the trailing slash, if you specify the path to be custom_path/
it will be printed as ...installed to custom_path//
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.
Not really, as the path would be custom_path/base
, due to
bitters/lib/bitters/generator.rb
Line 56 in 8e00402
Pathname.new(options[:path].to_s).join('base') |
This diff line (from the 2nd commit), only fixes the CLI output when running for example
bitters install --path foo
. It outputs Bitters files installed to foo/base/base
when it should show foo/base
.
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.
Makes sense
Any updates guys? Anything more I can do to help with this? |
@teoljungberg any sense on next steps/recommendations? |
I would still like to see tests for thi.s |
@mehlah Hi! Are you able to add tests to this PR? |
Allow
bitters reset
andbitters remove
to take--path
option