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

Verify rsync protocol version match prior to proceeding - Rebased on current master.#71

Merged
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Return error directly in internal/sync/sync.go#Version
  • Loading branch information
@stephenwithav
stephenwithav committedJul 2, 2020
commitd853066ae320cf5fbd04d5896e8f9aaf3a249265
2 changes: 1 addition & 1 deletioncmd/coder/sync.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -99,7 +99,7 @@ func (cmd *syncCmd) Run(fl *pflag.FlagSet) {
if rsyncErr != nil {
flog.Info("Unable to determine remote rsync version. Proceeding cautiously.")
} else if localVersion != remoteVersion {
flog.Fatal(fmt.Sprintf("rsync protocol mismatch.local is %s; remote is %s.", localVersion,remoteVersion))
flog.Fatal(fmt.Sprintf("rsync protocol mismatch.%s.", localVersion,rsyncErr))
}

for err == nil || err == sync.ErrRestartSync {
Expand Down
6 changes: 3 additions & 3 deletionsinternal/sync/sync.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -287,11 +287,11 @@ func (s Sync) Version() (string, error) {
io.Copy(buf, process.Stdout())

err = process.Wait()
ifcode, ok := err.(wsep.ExitError); ok {
return "",fmt.Errorf("Version check exit status: %v", code)
if_, ok := err.(wsep.ExitError); ok {
return "",err
}
if err != nil {
return "",fmt.Errorf("Server version mismatch")
return "",err
}

firstLine, err := buf.ReadString('\n')
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp