File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ process_runner = Sentry::ProcessRunner.new(
6060 build_args: [], # Array of String
6161 run_args: [], # Array of String
6262 should_build: true , # Bool
63- files: [] # Array of String
63+ files: [], # Array of String
64+ ignore: [] # Array of String
6465)
65- ```
66+ ```
Original file line number Diff line number Diff line change @@ -158,11 +158,11 @@ module Sentry
158158 @build_args : Array (String ) = [] of String ,
159159 @run_args : Array (String ) = [] of String ,
160160 files = [] of String ,
161- ignore_regexes = [] of String ,
161+ ignore = [] of String ,
162162 should_build = true
163163 )
164164 @files = files
165- @ignore_regexes = ignore_regexes .map { |regex | Regex .new(regex.strip(" /" )) }
165+ @ignore_regexes = ignore .map { |regex | Regex .new(regex.strip(" /" )) }
166166 @should_build = should_build
167167 @should_kill = false
168168 @app_built = false
@@ -200,6 +200,12 @@ module Sentry
200200 File .stat(file).mtime.to_s(" %Y%m%d%H%M%S" )
201201 end
202202
203+ private def ignored? (file : String )
204+ @ignore_regexes .any? do |regex |
205+ regex === file || regex === file.split(" /" ).last
206+ end
207+ end
208+
203209 # Compiles and starts the application
204210 #
205211 def start_app
@@ -221,7 +227,7 @@ module Sentry
221227 app_process = @app_process
222228 files = @files
223229 Dir .glob(files) do |file |
224- next if @ignore_regexes .any? { | r | r === file || r === file.split( " / " ).last }
230+ next if ! File .exists?( file) || ignored?(file)
225231 timestamp = get_timestamp(file)
226232 if FILE_TIMESTAMPS [file]? && FILE_TIMESTAMPS [file] != timestamp
227233 FILE_TIMESTAMPS [file] = timestamp
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ if Sentry::Config.shard_name
8282 run_args: config.run_args,
8383 should_build: config.should_build?,
8484 files: config.watch,
85- ignore_regexes : config.ignore
85+ ignore : config.ignore
8686 )
8787
8888 process_runner.run
You can’t perform that action at this time.
0 commit comments