mirror of
https://github.com/restic/restic.git
synced 2025-12-03 22:21:47 +00:00
rclone/sftp: Improve handling of ErrDot errors
Restic now yields a more informative error message when exec.ErrDot occurs.
This commit is contained in:
@@ -80,7 +80,10 @@ func startClient(cfg Config) (*SFTP, error) {
|
||||
|
||||
bg, err := backend.StartForeground(cmd)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "cmd.Start")
|
||||
if backend.IsErrDot(err) {
|
||||
return nil, errors.Errorf("cannot implicitly run relative executable %v found in current directory, use -o sftp.command=./<command> to override", cmd.Path)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// wait in a different goroutine
|
||||
|
||||
Reference in New Issue
Block a user