-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small cleanup for initial TUF rollout #1305
Small cleanup for initial TUF rollout #1305
Conversation
@@ -251,8 +251,7 @@ func FindNewest(ctx context.Context, fullBinaryPath string, opts ...newestOption | |||
// | |||
// It makes some string assumptions about how things are named. | |||
func getUpdateDir(fullBinaryPath string) string { | |||
installedPath := os.Getenv(LegacyAutoupdatePathEnvVar) | |||
if installedPath != "" { | |||
if installedPath := os.Getenv(LegacyAutoupdatePathEnvVar); installedPath != "" { |
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.
Thank you. There's another one several lines down
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.
Pushed an update to remove the strings.HasSuffix
check since strings.TrimSuffix
is a no-op if the suffix isn't present -- unless you meant a different one and I'm missing it?
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.
launcher/pkg/autoupdate/findnew.go
Lines 334 to 337 in dec53eb
installedPath := os.Getenv(LegacyAutoupdatePathEnvVar) | |
if installedPath != "" { | |
path = installedPath | |
} |
dec53eb
to
d356eaa
Compare
Relates to #954.
Makes code review changes from #1268.
Future work + linked PRs
Subsequent PRs will tackle the following (order is not set in stone):
Previous work: