mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-12-26 22:24:59 +08:00
importAgeSSHKeys never returnss an error
This commit is contained in:
parent
035bd53bb7
commit
c4a672fdec
1 changed files with 2 additions and 7 deletions
|
|
@ -932,7 +932,7 @@ func importSSHKeys(logcfg loggingConfig, keyPaths []string, gpgHome string) erro
|
|||
return nil
|
||||
}
|
||||
|
||||
func importAgeSSHKeys(logcfg loggingConfig, keyPaths []string, ageFile os.File) error {
|
||||
func importAgeSSHKeys(logcfg loggingConfig, keyPaths []string, ageFile os.File) {
|
||||
for _, p := range keyPaths {
|
||||
// Read the key
|
||||
sshKey, err := os.ReadFile(p)
|
||||
|
|
@ -962,8 +962,6 @@ func importAgeSSHKeys(logcfg loggingConfig, keyPaths []string, ageFile os.File)
|
|||
continue
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Like filepath.Walk but symlink-aware.
|
||||
|
|
@ -1414,10 +1412,7 @@ func installSecrets(args []string) error {
|
|||
|
||||
// Import SSH keys
|
||||
if len(manifest.AgeSSHKeyPaths) != 0 {
|
||||
err = importAgeSSHKeys(manifest.Logging, manifest.AgeSSHKeyPaths, *ageFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
importAgeSSHKeys(manifest.Logging, manifest.AgeSSHKeyPaths, *ageFile)
|
||||
}
|
||||
// Import the keyfile
|
||||
if manifest.AgeKeyFile != "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue