mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 08:47:47 +02:00
kitten @: Fix relative paths for --password-file being resolved relative to CWD instead of the kitty config directory
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -339,6 +340,9 @@ func get_password(password string, password_file string, password_env string, us
|
||||
}
|
||||
} else {
|
||||
var q []byte
|
||||
if !filepath.IsAbs(password_file) {
|
||||
password_file = filepath.Join(utils.ConfigDir(), password_file)
|
||||
}
|
||||
q, err = os.ReadFile(password_file)
|
||||
if err == nil {
|
||||
ans.is_set, ans.val = true, strings.TrimRight(string(q), " \n\t")
|
||||
|
||||
Reference in New Issue
Block a user