GODT-2173: fix: Migrate Bridge password from v2.X.

This commit is contained in:
Jakub
2022-12-12 17:29:43 +01:00
committed by Jakub Cuth
parent 57d563d488
commit 2b25fe1fa4
11 changed files with 243 additions and 101 deletions

View File

@ -34,13 +34,11 @@ func getKeychainPrefPath(vaultDir string) string {
}
func GetHelper(vaultDir string) (string, error) {
filePath := getKeychainPrefPath(vaultDir)
if _, err := os.Stat(filePath); errors.Is(err, fs.ErrNotExist) {
if _, err := os.Stat(getKeychainPrefPath(vaultDir)); errors.Is(err, fs.ErrNotExist) {
return "", nil
}
b, err := os.ReadFile(filePath)
b, err := os.ReadFile(getKeychainPrefPath(vaultDir))
if err != nil {
return "", err
}