Skip to content

Commit 9cbe87a

Browse files
committed
environment check
1 parent 9ebe751 commit 9cbe87a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/jekyll-admin/file_helper.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ def write_file(path, content)
2121
File.open(path, "wb") do |file|
2222
file.write(content)
2323
end
24-
site.read
24+
# we should fully process in dev mode for tests to pass
25+
if ENV["RACK_ENV"] == "production"
26+
site.read
27+
else
28+
site.process
29+
end
2530
end
2631

2732
# Delete the file at the given path

0 commit comments

Comments
 (0)