Skip to content

Commit

Permalink
Use non-subshell system variant in installer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonathanhefner committed Dec 1, 2023
1 parent 6298cd4 commit 9442bed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/importmap_tasks.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace :importmap do
desc "Setup Importmap for the app"
task :install do
system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/install.rb", __dir__)}"
system RbConfig.ruby, "./bin/rails", "app:template", "LOCATION=#{File.expand_path("../install/install.rb", __dir__)}"
end
end

0 comments on commit 9442bed

Please sign in to comment.