Skip to content

Commit

Permalink
fix: Handle keepassxc-cli localization
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jan 13, 2024
1 parent 96083d4 commit 49791f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/cmd/keepassxctemplatefuncs.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,11 @@ func (c *Config) keepassxcOutputOpen(command string, args ...string) ([]byte, er
return nil, err
}

// Start the keepassxc-cli open command.
// Start the keepassxc-cli open command. Set the LANGUAGE environment
// variable to ensure that the prompt is in US English.
cmdArgs := append(slices.Clone(c.Keepassxc.Args), "open", c.Keepassxc.Database.String())
cmd := exec.Command(c.Keepassxc.Command, cmdArgs...) //nolint:gosec
cmd.Env = append(os.Environ(), "LANGUAGE=en")
cmd.Stdin = console.Tty()
cmd.Stdout = console.Tty()
cmd.Stderr = console.Tty()
Expand Down

0 comments on commit 49791f9

Please sign in to comment.