File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -307,10 +307,7 @@ def self.adjust_position_of_plus_minus(string_in)
307307 # @param string_in [String] Input string, which might contain trailing whitespace
308308 # @return [String] Modified string
309309 def self . make_trailing_whitespace_visible ( string_in )
310- if string_in . length > 1000
311- raise ArgumentError , "Input string too long"
312- end
313- return string_in unless string_in =~ /\A ((?:.|\n )*?)(\s +)(\e \[ 0m)?\Z /
310+ return string_in unless string_in =~ /\A ((?:.|\n ){1,1000}?)(\s +)(\e \[ 0m)?\Z /
314311 beginning = Regexp . last_match ( 1 )
315312 trailing_space = Regexp . last_match ( 2 )
316313 end_escape = Regexp . last_match ( 3 )
Original file line number Diff line number Diff line change @@ -155,10 +155,7 @@ def install_fact_file(logger, options)
155155 elsif options [ :fact_file ]
156156 raise Errno ::ENOENT , "Fact file #{ options [ :fact_file ] } does not exist" unless File . file? ( options [ :fact_file ] )
157157 fact_file_opts = { fact_file_string : File . read ( options [ :fact_file ] ) }
158- if options [ :fact_file ] . length > 1000
159- raise ArgumentError , "Input too long"
160- end
161- fact_file_opts [ :backend ] = Regexp . last_match ( 1 ) . to_sym if options [ :fact_file ] =~ /.*\. (\w +)$/
158+ fact_file_opts [ :backend ] = Regexp . last_match ( 1 ) . to_sym if options [ :fact_file ] =~ /.{1,1000}\. (\w +)$/
162159 OctocatalogDiff ::Facts . new ( fact_file_opts )
163160 else
164161 raise ArgumentError , 'No facts passed to "install_fact_file" method'
You can’t perform that action at this time.
0 commit comments