Skip to content

Commit

Permalink
Fix the issue with SSH deployment failing to upload the certificate.
Browse files Browse the repository at this point in the history
  • Loading branch information
usual2970 committed Aug 30, 2024
1 parent 2549f61 commit 993b34e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/deployer/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (s *ssh) upload(client *sshPkg.Client, content, path string) error {
}
defer sftpCli.Close()

if err := sftpCli.MkdirAll(xpath.Base(path)); err != nil {
if err := sftpCli.MkdirAll(xpath.Dir(path)); err != nil {
return fmt.Errorf("failed to create remote directory: %w", err)
}

Expand Down
12 changes: 12 additions & 0 deletions internal/deployer/ssh_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package deployer

import (
"os"
"path"
"testing"
)

func TestPath(t *testing.T) {
dir := path.Dir("./a/b/c")
os.MkdirAll(dir, 0755)
}

0 comments on commit 993b34e

Please sign in to comment.