Skip to content
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

Merged
merged 6 commits into from
Aug 30, 2023

Conversation

RebeccaMahany
Copy link
Contributor

cmd/launcher/launcher.go Show resolved Hide resolved
@@ -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 != "" {
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

installedPath := os.Getenv(LegacyAutoupdatePathEnvVar)
if installedPath != "" {
path = installedPath
}

James-Pickett
James-Pickett previously approved these changes Aug 29, 2023
@RebeccaMahany RebeccaMahany merged commit 5d943ae into kolide:main Aug 30, 2023
24 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/tuf-rollout-cleanup branch August 30, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants