mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
backend/util: extract background handling code
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"github.com/restic/restic/internal/debug"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/feature"
|
||||
"github.com/restic/restic/internal/terminal"
|
||||
|
||||
"github.com/cenkalti/backoff/v4"
|
||||
"github.com/pkg/sftp"
|
||||
@@ -84,7 +85,7 @@ func startClient(cfg Config) (*SFTP, error) {
|
||||
return nil, errors.Wrap(err, "cmd.StdoutPipe")
|
||||
}
|
||||
|
||||
bg, err := util.StartForeground(cmd)
|
||||
bg, err := terminal.StartForeground(cmd)
|
||||
if err != nil {
|
||||
if errors.Is(err, exec.ErrDot) {
|
||||
return nil, errors.Errorf("cannot implicitly run relative executable %v found in current directory, use -o sftp.command=./<command> to override", cmd.Path)
|
||||
|
||||
Reference in New Issue
Block a user