Skip to content

Commit

Permalink
fix(engine): create parent directories when uploading files
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasfrahm committed Apr 20, 2022
1 parent e1612dd commit dfff15a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func (e *Engine) Configure(node *Node) error {
return err
}

// TODO: Configure the "advertise address" based on the first SAN and modify the
// kubeconfig accordingly.

// TODO: Upload configuration and move it to appropriate location using "sudo".

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (node *Node) Upload(dst string, src io.Reader) error {
dir := filepath.Dir(dst)

// Create directory if it does not exist.
if err := node.Client.SFTP.Mkdir(dir); err != nil {
if err := node.Client.SFTP.MkdirAll(dir); err != nil {
return err
}

Expand Down

0 comments on commit dfff15a

Please sign in to comment.