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

Commitd853066

Browse files
committed
Return error directly in internal/sync/sync.go#Version
1 parent21976c6 commitd853066

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎cmd/coder/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (cmd *syncCmd) Run(fl *pflag.FlagSet) {
9999
ifrsyncErr!=nil {
100100
flog.Info("Unable to determine remote rsync version. Proceeding cautiously.")
101101
}elseiflocalVersion!=remoteVersion {
102-
flog.Fatal(fmt.Sprintf("rsync protocol mismatch.local is %s; remote is %s.",localVersion,remoteVersion))
102+
flog.Fatal(fmt.Sprintf("rsync protocol mismatch.%s.",localVersion,rsyncErr))
103103
}
104104

105105
forerr==nil||err==sync.ErrRestartSync {

‎internal/sync/sync.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ func (s Sync) Version() (string, error) {
287287
io.Copy(buf,process.Stdout())
288288

289289
err=process.Wait()
290-
ifcode,ok:=err.(wsep.ExitError);ok {
291-
return"",fmt.Errorf("Version check exit status: %v",code)
290+
if_,ok:=err.(wsep.ExitError);ok {
291+
return"",err
292292
}
293293
iferr!=nil {
294-
return"",fmt.Errorf("Server version mismatch")
294+
return"",err
295295
}
296296

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp