replacer: working directory global placeholder (#5127)

This commit is contained in:
Kévin Dunglas
2022-10-07 11:54:41 +02:00
committed by GitHub
parent d46ba2e27f
commit b4e28af953
2 changed files with 9 additions and 0 deletions

View File

@@ -308,6 +308,10 @@ func globalDefaultReplacements(key string) (any, bool) {
return string(filepath.Separator), true
case "system.os":
return runtime.GOOS, true
case "system.wd":
// OK if there is an error; just return empty string
wd, _ := os.Getwd()
return wd, true
case "system.arch":
return runtime.GOARCH, true
case "time.now":