Skip to content

Commit 9442bed

Browse files
Use non-subshell system variant in installer
This prevents an error when the template path contains characters that should be escaped. For example, if the `importmap-rails` gem is installed in a directory that has whitespace characters in its path. Avoiding a subshell is also more performant.
1 parent 6298cd4 commit 9442bed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tasks/importmap_tasks.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace :importmap do
22
desc "Setup Importmap for the app"
33
task :install do
4-
system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/install.rb", __dir__)}"
4+
system RbConfig.ruby, "./bin/rails", "app:template", "LOCATION=#{File.expand_path("../install/install.rb", __dir__)}"
55
end
66
end

0 commit comments

Comments
 (0)