Skip to content

Commit

Permalink
rtfiles: Give user defined runtime files precedence over asset files
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKar committed Dec 1, 2023
1 parent d8e9d61 commit 8726b6d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/config/rtfiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@ func AddRuntimeFilesFromAssets(fileType RTFiletype, directory, pattern string) {
if err != nil {
return
}

assetLoop:
for _, f := range files {
if ok, _ := path.Match(pattern, f); ok {
for _, rf := range realFiles[fileType] {
if f == rf.Name()+strings.TrimPrefix(pattern, "*") {
continue assetLoop
}
}
AddRuntimeFile(fileType, assetFile(path.Join(directory, f)))
}
}
Expand Down

0 comments on commit 8726b6d

Please sign in to comment.