Skip to content

Commit 93e68b7

Browse files
author
David Heinemeier Hansson
committed
Only append to Sprockets manifest if its there
1 parent c4b771e commit 93e68b7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/install/install.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
say "Build into app/assets/builds"
22
empty_directory "app/assets/builds"
33
keep_file "app/assets/builds"
4-
append_to_file "app/assets/config/manifest.js", %(//= link_tree ../builds\n)
4+
5+
if (sprockets_manifest_path = Rails.root.join("app/assets/config/manifest.js")).exist?
6+
append_to_file sprockets_manifest_path, %(//= link_tree ../builds\n)
7+
end
58

69
say "Stop linking stylesheets automatically"
710
gsub_file "app/assets/config/manifest.js", "//= link_directory ../stylesheets .css\n", ""

0 commit comments

Comments
 (0)