Revision 2da8345d
Added by Marc Dequènes over 15 years ago
- ID 2da8345df1ce6a5d0ab4aa9ec07686234ef8d656
lib/cyborghood/order.rb | ||
---|---|---|
end
|
||
|
||
class Order
|
||
include GetText
|
||
attr_reader :error, :user, :commands, :shared_parameters
|
||
|
||
def initialize(params = {})
|
||
... | ... | |
next if line == "" or line[0, 1] == "#"
|
||
|
||
errors = []
|
||
cmd_parts = line.shellsplit.collect do |word|
|
||
begin
|
||
raw_cmd_parts = line.shellsplit
|
||
rescue
|
||
errors << N_("Syntax error in command.")
|
||
raw_cmd_parts = []
|
||
end
|
||
cmd_parts = raw_cmd_parts.collect do |word|
|
||
yield word, errors, used_refs
|
||
end
|
||
|
Also available in: Unified diff
[fix] catch problems when splitting the command line, and do not forget to include gettext support for the error messages