aboutsummaryrefslogtreecommitdiffstats
path: root/lib/state/templates.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/state/templates.go')
-rw-r--r--lib/state/templates.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/state/templates.go b/lib/state/templates.go
index 801de752..c7bfad8c 100644
--- a/lib/state/templates.go
+++ b/lib/state/templates.go
@@ -713,6 +713,10 @@ func (d *templateData) Signature() string {
func (d *templateData) readSignatureFromCmd() ([]byte, error) {
sigCmd := d.account.SignatureCmd
cmd := exec.Command("sh", "-c", sigCmd)
+ env := os.Environ()
+ env = append(env, fmt.Sprintf("AERC_ACCOUNT=%s", d.account.Name))
+ env = append(env, fmt.Sprintf("AERC_FOLDER=%s", d.folder.Name))
+ cmd.Env = env
signature, err := cmd.Output()
if err != nil {
return nil, err