Skip to content

Commit bc0b9d6

Browse files
committed
chore: clean up update logs
1 parent 5cd5763 commit bc0b9d6

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

internal/cli/commands/update.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ func NewUpdateCmd(version string) *cobra.Command {
1919
}
2020

2121
func runUpdate(currentVersion string) error {
22-
fmt.Println("Checking for updates...")
23-
2422
if err := update.SelfUpdate(currentVersion); err != nil {
2523
return fmt.Errorf("update failed: %w", err)
2624
}

internal/cli/update/updater.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@ func SelfUpdate(currentVersion string) error {
2626
return nil
2727
}
2828

29-
fmt.Printf("Updating from %s to %s...\n", currentVersion, latestVersion)
30-
3129
// Detect platform
3230
binaryName, err := getBinaryName()
3331
if err != nil {
3432
return err
3533
}
3634

3735
// Download new binary
38-
fmt.Println("Downloading new version...")
3936
downloadURL := fmt.Sprintf("%s/%s/%s", DownloadBaseURL, latestVersion, binaryName)
4037

4138
tmpFile, err := downloadFile(downloadURL)
@@ -45,7 +42,6 @@ func SelfUpdate(currentVersion string) error {
4542
defer os.Remove(tmpFile)
4643

4744
// Download and verify checksum
48-
fmt.Println("Verifying checksum...")
4945
checksumURL := fmt.Sprintf("%s.sha256", downloadURL)
5046
if err := verifyChecksum(tmpFile, checksumURL); err != nil {
5147
return fmt.Errorf("checksum verification failed: %w", err)
@@ -64,12 +60,11 @@ func SelfUpdate(currentVersion string) error {
6460
}
6561

6662
// Replace binary
67-
fmt.Println("Installing new version...")
6863
if err := replaceBinary(tmpFile, execPath); err != nil {
6964
return fmt.Errorf("failed to install update: %w", err)
7065
}
7166

72-
fmt.Printf("\n✓ Successfully updated to version %s!\n", latestVersion)
67+
fmt.Printf("branchd updated to %s\n", latestVersion)
7368

7469
return nil
7570
}

0 commit comments

Comments
 (0)