mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-02 03:22:59 +00:00
fix(provider): race condition in~/.ssh
path existence check (#1052)
fix: ignore error if path exists Signed-off-by: Fabian Franz <fabian.franz@sva.de> Co-authored-by: Fabian Franz <fabian.franz@sva.de>
This commit is contained in:
parent
16511af72a
commit
f7f67dbd3d
@ -256,7 +256,7 @@ func (c *client) openNodeShell(ctx context.Context, node ProxmoxNode) (*ssh.Clie
|
||||
sshPath := path.Join(homeDir, ".ssh")
|
||||
if _, err = os.Stat(sshPath); os.IsNotExist(err) {
|
||||
e := os.Mkdir(sshPath, 0o700)
|
||||
if e != nil {
|
||||
if e != nil && !os.IsExist(e) {
|
||||
return nil, fmt.Errorf("failed to create %s: %w", sshPath, e)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user