Skip to content

Commit

Permalink
improve installer --enable option passing
Browse files Browse the repository at this point in the history
  • Loading branch information
matthutchinson committed Mar 13, 2016
1 parent 9a0951d commit 8bb5c5f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions bin/lolcommits
Expand Up @@ -162,20 +162,12 @@ Choice.options do
long '--enable'
short '-e'
desc 'install lolcommits for this repo'
action do
Installation.do_enable
exit 0
end
end

option :disable do
long '--disable'
short '-d'
desc 'uninstall lolcommits for this repo'
action do
Installation.do_disable
exit 0
end
end

option :capture do
Expand Down Expand Up @@ -312,7 +304,11 @@ load_local_plugins!
#
# Handle actions manually since choice seems weird
#
if Choice.choices[:capture]
if Choice.choices[:enable]
Installation.do_enable
elsif Choice.choices[:disable]
Installation.do_disable
elsif Choice.choices[:capture]
do_capture
elsif Choice.choices[:configure]
do_configure
Expand Down

0 comments on commit 8bb5c5f

Please sign in to comment.