mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 22:27:22 +00:00
Merge pull request #1246 from Infisical/patch-5
extract base from template source path
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
@@ -189,7 +190,9 @@ func ProcessTemplate(templatePath string, data interface{}, accessToken string)
|
|||||||
"secret": secretFunction,
|
"secret": secretFunction,
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpl, err := template.New(templatePath).Funcs(funcs).ParseFiles(templatePath)
|
templateName := path.Base(templatePath)
|
||||||
|
|
||||||
|
tmpl, err := template.New(templateName).Funcs(funcs).ParseFiles(templatePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user