From b4e28af953aa02fb44f88c155956488b1f473348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Fri, 7 Oct 2022 11:54:41 +0200 Subject: replacer: working directory global placeholder (#5127) --- replacer.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'replacer.go') diff --git a/replacer.go b/replacer.go index 5797920..7f97f34 100644 --- a/replacer.go +++ b/replacer.go @@ -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": -- cgit v1.2.3