Skip to content

Commit

Permalink
Rescue CommandNotInstalled exceptions and print a regular error.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Apr 21, 2024
1 parent 1716749 commit b5ac24f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ronin/repos/cli/commands/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Install < Command
def run(uri)
log_info "Installing repository from #{uri} ..."
cache_dir.install(uri)
rescue CommandFailed => error
rescue CommandNotInstalled, CommandFailed => error
print_error(error.message)
exit(-1)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/repos/cli/commands/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def run(name=nil)

begin
repo.update
rescue CommandFailed => error
rescue CommandNotInstalled, CommandFailed => error
log_error("failed to update repository #{repo}: #{error.message}")
end
end
Expand Down

0 comments on commit b5ac24f

Please sign in to comment.