This commit is contained in:
Max 2023-10-23 13:05:09 +08:00
parent 598cdf69a8
commit 0927a12735

View file

@ -15,8 +15,14 @@ import (
func (tmpl *Template) Build(option *core.BuildOption) error {
var err error
root, err := tmpl.local.DSL.PublicRoot()
if err != nil {
log.Error("SyncAssets: Get the public root error: %s. use %s", err.Error(), tmpl.local.DSL.Public.Root)
root = tmpl.local.DSL.Public.Root
}
if option.AssetRoot == "" {
option.AssetRoot = filepath.Join(tmpl.local.DSL.Public.Root, "assets")
option.AssetRoot = filepath.Join(root, "assets")
}
// Sync the assets