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
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
Remove go from io.Copy in internal/sync/sync.go#Version
  • Loading branch information
@stephenwithav
stephenwithav committedJul 2, 2020
commit21976c65f28b437d9df10a00ca4851444666ce32
4 changes: 2 additions & 2 deletionsinternal/sync/sync.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -284,11 +284,11 @@ func (s Sync) Version() (string, error) {
return "", err
}
buf := &bytes.Buffer{}
goio.Copy(buf, process.Stdout())
io.Copy(buf, process.Stdout())

err = process.Wait()
if code, ok := err.(wsep.ExitError); ok {
return "", fmt.Errorf("Versionheck exit status: %v", code)
return "", fmt.Errorf("Versioncheck exit status: %v", code)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
return"",fmt.Errorf("Version check exit status: %v",code)
return"",fmt.Errorf("version check exit status: %v",code)

}
if err != nil {
return "", fmt.Errorf("Server version mismatch")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd prefer returning the error here instead.

stephenwithav reacted with thumbs up emoji
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp