@@ -33,8 +33,7 @@ func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallReq) (*rpc
33
33
// If no version is specified consider the installed
34
34
version , err := semver .Parse (req .Version )
35
35
if err != nil {
36
- formatter .PrintError (err , "version not readable" )
37
- return nil , fmt .Errorf ("version not readable" , err )
36
+ return nil , fmt .Errorf ("invalid version: %s" , err )
38
37
}
39
38
ref := & packagemanager.PlatformReference {
40
39
Package : req .PlatformPackage ,
@@ -45,13 +44,13 @@ func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallReq) (*rpc
45
44
platform := pm .FindPlatform (ref )
46
45
if platform == nil {
47
46
formatter .PrintErrorMessage ("Platform not found " + ref .String ())
48
- return nil , fmt .Errorf ("Platform not found " + ref .String (), err )
47
+ return nil , fmt .Errorf ("platform not found: %s" , ref .String ())
49
48
50
49
}
51
50
platformRelease := pm .GetInstalledPlatformRelease (platform )
52
51
if platformRelease == nil {
53
52
formatter .PrintErrorMessage ("Platform not installed " + ref .String ())
54
- return nil , fmt .Errorf ("Platform not installed " + ref .String (), err )
53
+ return nil , fmt .Errorf ("platform not installed: %s" , ref .String ())
55
54
56
55
}
57
56
ref .PlatformVersion = platformRelease .Version
@@ -60,8 +59,7 @@ func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallReq) (*rpc
60
59
platform , tools , err := pm .FindPlatformReleaseDependencies (ref )
61
60
if err != nil {
62
61
formatter .PrintError (err , "Could not determine platform dependencies" )
63
- return nil , fmt .Errorf ("Could not determine platform dependencies" , err )
64
-
62
+ return nil , fmt .Errorf ("finding platform dependencies: %s" , err )
65
63
}
66
64
67
65
err = uninstallPlatformRelease (pm , platform )
0 commit comments