M count.go => count.go +0 -1
@@ 53,7 53,6 @@ func (nm *Notmuch) CountBatch(ctx context.Context, r io.Reader) (*Counts, error)
stderr: bytes.NewBuffer(nil),
}
c.cmd.Args = append(c.cmd.Args, "count", "--batch", "--lastmod")
- c.cmd.Args = append(c.cmd.Args)
c.cmd.Stdin = r
c.cmd.Stderr = c.stderr
c.stdout, err = c.cmd.StdoutPipe()
M notmuch.go => notmuch.go +3 -1
@@ 3,6 3,7 @@ package notmuch
import (
"context"
"fmt"
+ "os"
"os/exec"
)
@@ 19,6 20,7 @@ func (nm *Notmuch) new(ctx context.Context) *exec.Cmd {
cmd.Process.Kill()
return cmd.Wait()
}
+ cmd.Env = os.Environ()
if nm.Config != "" {
config := fmt.Sprintf("NOTMUCH_CONFIG=%s", nm.Config)
cmd.Env = append(cmd.Env, config)
@@ 28,7 30,7 @@ func (nm *Notmuch) new(ctx context.Context) *exec.Cmd {
cmd.Env = append(cmd.Env, db)
}
if nm.Profile != "" {
- profile := fmt.Sprintf("NOTMUCH_PROFILE=%s", nm.Database)
+ profile := fmt.Sprintf("NOTMUCH_PROFILE=%s", nm.Profile)
cmd.Env = append(cmd.Env, profile)
}
if nm.UUID != "" {