Skip to content

Commit

Permalink
fix: scp target add defalt ./
Browse files Browse the repository at this point in the history
  • Loading branch information
longalong committed Nov 11, 2022
1 parent 66023a1 commit 8ca4e48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ func ParseScpOption(s string) (ScpOption, error) {
}
}

if len(sstar) != 3 {
return ScpOption{}, errors.Errorf("fail to parse scp syntax : %s", s)
if len(sstar) != 3 { // 默认 target 地址为 ./
sstar = append(sstar, "./")
}

if sstar[0] != "scp" {
Expand Down

0 comments on commit 8ca4e48

Please # to comment.