This repository was archived by the owner on Aug 30, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork18
Remove fatal calls from sdk client creation#123
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8337987
to1594a12
Comparecreack approved these changesSep 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Might want to consider adding more wrapping, but lgtm. Big improvement!
internal/cmd/sync.go Outdated
iferr!=nil { | ||
returnerr | ||
} | ||
absLocal,err:=filepath.Abs(local) | ||
iferr!=nil { | ||
flog.Fatal("make abs path out of %v: %v",local,absLocal) | ||
returnxerrors.Errorf("make abs path out of %s: %s",local,absLocal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
nit: might want to add a %w with the underlying error?
internal/cmd/sync.go Outdated
@@ -95,7 +98,7 @@ func makeRunSync(init *bool) func(cmd *cobra.Command, args []string) error { | |||
ifrsyncErr!=nil { | |||
flog.Info("Unable to determine remote rsync version. Proceeding cautiously.") | |||
}elseiflocalVersion!=remoteVersion { | |||
flog.Fatal("rsync protocol mismatch: local = %v, remote = %v",localVersion,rsyncErr) | |||
returnxerrors.Errorf("rsync protocol mismatch: local = %s, remote = %s",localVersion,rsyncErr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
might want to remove rsyncErr here as we know it will be nil. I suspect it might have been a typo for remoteVersion?
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes#114