Skip to content
This repository
Browse code

Don't crash on unmatched quote in repl

  • Loading branch information...
commit 2ab01c5fed198ee451837b062f0e02e783519289 1 parent eef059c
Matthew Boedicker and Pieter Noordhuis authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 warden/lib/warden/repl/repl_v2.rb
6 warden/lib/warden/repl/repl_v2.rb
@@ -112,7 +112,11 @@ def process_line(line)
112 112 line = line.strip
113 113 return if line.empty?
114 114
115   - process_command(Shellwords.shellsplit(line))
  115 + begin
  116 + process_command(Shellwords.shellsplit(line))
  117 + rescue ArgumentError => e
  118 + raise CommandError, e.message
  119 + end
116 120 end
117 121
118 122 # Returns a prettified description [String] of all commands defined in the

0 comments on commit 2ab01c5

Please sign in to comment.
Something went wrong with that request. Please try again.