Skip to content

Commit 631f7fb

Browse files
committed
Suppress bad Directory comment when DocumentRoot is not set.
It's valid for a DocumentRoot to be missing (docroot => false). However, in the directories section, this leads to a confusing message: "## Directories, there should at least be a declaration for false"
1 parent f792686 commit 631f7fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

templates/vhost/_directories.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
<%- scope.setvar('_template_scope', {}) -%>
3+
<%- if @docroot -%>
34
## Directories, there should at least be a declaration for <%= @docroot %>
5+
<%- else -%>
6+
## Directories
7+
<%- end -%>
48
<%- @_directories.each do |directory| -%>
59
<%- if directory['path'] and directory['path'] != '' -%>
610
<%- if directory['provider'] and directory['provider'].match('(directory|location|files|proxy)') -%>

0 commit comments

Comments
 (0)