From 67a7faa087636d33149922185babcdd5bf3384e0 Mon Sep 17 00:00:00 2001 From: Jessica Yuen <im.jessicayuen@gmail.com> Date: Mon, 8 Jan 2018 13:32:08 -0800 Subject: [PATCH] Clarify error message for duplicate packages on install Consider the scenario where the user has two registries 'incubator', and 'incubatorXYZ' pointing to the same repository. It might be confusing why running `ks pkg install incubatorXYZ/mysql` fails if they ran `ks pkg install incubator/mysql` previously. This is a small change to help users resolve that scenario by passing the `--name` flag on install. Signed-off-by: Jessica Yuen <im.jessicayuen@gmail.com> --- metadata/registry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata/registry.go b/metadata/registry.go index 38b6b171..6eb5dac0 100644 --- a/metadata/registry.go +++ b/metadata/registry.go @@ -151,7 +151,7 @@ func (m *manager) CacheDependency(registryName, libID, libName, libVersion strin } if _, ok := appSpec.Libraries[libName]; ok { - return nil, fmt.Errorf("Library '%s' already exists", libName) + return nil, fmt.Errorf("Package '%s' already exists. Use the --name flag to install this package with a unique identifier", libName) } // Retrieve registry manager for this specific registry. -- GitLab