Skip to content

Commit 4079544

Browse files
committed
Changed return management for download, install and upgrade command
1 parent 51e89fd commit 4079544

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

commands/core/download.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ func PlatformDownload(ctx context.Context, req *rpc.PlatformDownloadReq, progres
5050
}
5151
err = downloadPlatform(pm, platform, progressCallback)
5252
if err != nil {
53-
formatter.PrintError(err, "Error Installing "+platform.String())
5453
return nil, err
5554
}
5655
for _, tool := range tools {

commands/core/install.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func PlatformInstall(ctx context.Context, req *rpc.PlatformInstallReq) (*rpc.Pla
3434

3535
err = installPlatform(pm, platform, tools)
3636
if err != nil {
37-
formatter.PrintError(err, "Error Installing "+platform.String())
3837
return nil, err
3938
}
4039

commands/core/upgrade.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ func PlatformUpgrade(ctx context.Context, req *rpc.PlatformUpgradeReq) (*rpc.Pla
4444
PlatformVersion: version}
4545
pm := commands.GetPackageManager(req)
4646

47-
UpgradePlatform(pm, ref)
47+
err := UpgradePlatform(pm, ref)
48+
if err != nil {
49+
return nil, err
50+
}
4851
return &rpc.PlatformUpgradeResp{}, nil
4952
}
5053

@@ -81,7 +84,10 @@ func UpgradePlatform(pm *packagemanager.PackageManager, platformRef *packagemana
8184
if err != nil {
8285
return fmt.Errorf("Platform " + platformRef.String() + " is not installed")
8386
}
84-
installPlatform(pm, platform, tools)
87+
err = installPlatform(pm, platform, tools)
88+
if err != nil {
89+
return err
90+
}
8591
}
8692
return nil
8793
}

0 commit comments

Comments
 (0)