Skip to content

Commit 07bac3f

Browse files
committed
fix static build
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 4201a37 commit 07bac3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/options/static.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ func fileFromOptionsDir(elems ...string) ([]byte, error) {
6868
}
6969

7070
// fileFromOptionsDir is a helper to read files from custom path or bindata.
71-
func fileFromOptionsDirExtensions(elem string, extensions ...string) ([]byte, string, error) {
71+
func fileFromOptionsDirExtensions(elems []string, extensions ...string) ([]byte, string, error) {
7272
// only try custom dir, no static dir
73-
if data, extension, err := readLocalFileExtensions([]string{setting.CustomPath}, "options", elem, extensions...); err == nil {
73+
if data, extension, err := readLocalFileExtensions([]string{setting.CustomPath}, "options", elems, extensions...); err == nil {
7474
return data, extension, nil
7575
}
7676

@@ -93,6 +93,7 @@ func fileFromOptionsDirExtensions(elem string, extensions ...string) ([]byte, st
9393
}
9494
return bs, extension, nil
9595
}
96+
return nil, "", os.ErrNotExist
9697
}
9798

9899
func Asset(name string) ([]byte, error) {

0 commit comments

Comments
 (0)