Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to sftp-server binary found in path
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
arixmkii committed Jan 31, 2025
1 parent 5fc3e81 commit 14eeaba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/hostagent/mount.go
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"os"
"os/exec"

"github.com/lima-vm/lima/pkg/limayaml"
"github.com/lima-vm/lima/pkg/localpathutil"
@@ -64,6 +65,10 @@ func (a *HostAgent) setupMount(m limayaml.Mount) (*mount, error) {
Readonly: !(*m.Writable),
SSHFSAdditionalArgs: []string{"-o", sshfsOptions},
}
serverPath, err := exec.LookPath("sftp-server")
if err == nil {
rsf.OpensshSftpServerBinary = serverPath
}
if err := rsf.Prepare(); err != nil {
return nil, fmt.Errorf("failed to prepare reverse sshfs for %q on %q: %w", location, mountPoint, err)
}

0 comments on commit 14eeaba

Please sign in to comment.