Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commiteefa329

Browse files
author
Russtopia
committed
Improve ssync error msgs
1 parentc69c791 commiteefa329

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎cmd/coder/sync.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"errors"
5+
"fmt"
56
"os"
67
"path/filepath"
78
"strings"
@@ -31,7 +32,8 @@ func (cmd *syncCmd) RegisterFlags(fl *pflag.FlagSet) {
3132
}
3233

3334
// See https://lxadm.com/Rsync_exit_codes#List_of_standard_rsync_exit_codes.
34-
varNoRsync=errors.New("rsync: exit status 2")
35+
varIncompatRsync=errors.New("rsync: exit status 2")
36+
varStreamErrRsync=errors.New("rsync: exit status 12")
3537

3638
func (cmd*syncCmd)Run(fl*pflag.FlagSet) {
3739
var (
@@ -79,8 +81,10 @@ func (cmd *syncCmd) Run(fl *pflag.FlagSet) {
7981
err=s.Run()
8082
}
8183

82-
iferr==NoRsync {
84+
iffmt.Sprintf("%v",err)==fmt.Sprintf("%v",IncompatRsync) {
8385
flog.Fatal("no compatible rsync present on remote machine")
86+
}elseiffmt.Sprintf("%v",err)==fmt.Sprintf("%v",StreamErrRsync) {
87+
flog.Fatal("error in rsync protocol datastream (no installed remote rsync?)")
8488
}else {
8589
flog.Fatal("sync: %v",err)
8690
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp