File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,19 @@ namespace :test do
5050 namespace :isolated do
5151 desc 'Run isolated tests for Railtie'
5252 task :railtie do
53+ require 'shellwords'
5354 dir = File . dirname ( __FILE__ )
54- file = "#{ dir } /test/active_model_serializers/railtie_test_isolated.rb"
55+ file = Shellwords . shellescape ( "#{ dir } /test/active_model_serializers/railtie_test_isolated.rb" )
56+ dir = Shellwords . shellescape ( dir )
5557
5658 # https://github.com/rails/rails/blob/3d590add45/railties/lib/rails/generators/app_base.rb#L345-L363
5759 _bundle_command = Gem . bin_path ( 'bundler' , 'bundle' )
5860 require 'bundler'
5961 Bundler . with_clean_env do
6062 command = "-w -I#{ dir } /lib -I#{ dir } /test #{ file } "
6163 full_command = %("#{ Gem . ruby } " #{ command } )
62- system ( full_command ) or fail 'Failures' # rubocop:disable Style/AndOr
64+ system ( full_command ) or # rubocop:disable Style/AndOr
65+ fail 'Failures'
6366 end
6467 end
6568 end
You can’t perform that action at this time.
0 commit comments