Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
e9515425
Commit
e9515425
authored
Jan 17, 2018
by
Whitestrake
Committed by
Matt Holt
Jan 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use import to handle globbed values for -conf flag (#1973)
parent
c80c34ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
caddy/caddymain/run.go
caddy/caddymain/run.go
+11
-3
No files found.
caddy/caddymain/run.go
View file @
e9515425
...
...
@@ -170,10 +170,18 @@ func confLoader(serverType string) (caddy.Input, error) {
return
caddy
.
CaddyfileFromPipe
(
os
.
Stdin
,
serverType
)
}
contents
,
err
:=
ioutil
.
ReadFile
(
conf
)
if
err
!=
nil
{
return
nil
,
err
var
contents
[]
byte
if
strings
.
Contains
(
conf
,
"*"
)
{
// Let caddyfile.doImport logic handle the globbed path
contents
=
[]
byte
(
"import "
+
conf
)
}
else
{
var
err
error
contents
,
err
=
ioutil
.
ReadFile
(
conf
)
if
err
!=
nil
{
return
nil
,
err
}
}
return
caddy
.
CaddyfileInput
{
Contents
:
contents
,
Filepath
:
conf
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment