Skip to content

Commit

Permalink
fix: Always exit 0 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pusewicz committed Mar 17, 2024
1 parent 536f54a commit a0f6d90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/vimpk/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def initialize(argv)
def call
if @command
send(@command, *@argv)
exit 0
else
puts @parser.parser
end
Expand All @@ -37,6 +38,8 @@ def determine_command
case name
when "i", "install"
:install_command
when "l", "list"
:list_command
when "mv", "move"
:move_command
when "u", "update"
Expand All @@ -49,6 +52,12 @@ def determine_command
end
end

def list_command
command = List.new(@options)
list = command.call
puts list.sort_by(&:downcase)
end

def install_command(package = nil)
time = Time.now
install = Install.new(package, @options)
Expand Down

0 comments on commit a0f6d90

Please sign in to comment.