mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 19:15:04 +08:00
9fea43e46a
`FileUtils.cd` and `Dir.chdir` cause the working directory to change for the entire process. We run sidekiq jobs, hijacked requests and deferred jobs in threads, which can make working directory changes have unintended side-effects. - Add a rubocop rule to warn about usage of Dir.chdir and FileUtils.cd - Added rubocop:disable for scripts used outside the app - Refactored code using cd to use alternative methods - Temporarily skipped the rubocop check for lib/backup_restore. This will require more complex refactoring, so I will create a separate PR for review |
||
---|---|---|
.. | ||
base_runner.rb | ||
formatter.rb | ||
manager.rb | ||
qunit_runner.rb | ||
reload_css.rb | ||
rspec_runner.rb | ||
simple_runner.rb |