From 9a346938d838da9572850c352c049b2ff9db3b0c Mon Sep 17 00:00:00 2001 From: Adesh Deshmukh Date: Wed, 17 Jun 2026 07:53:26 +0530 Subject: [PATCH] fix: import-url success message now respects mainArtifact flag Signed-off-by: Adesh Deshmukh --- cmd/importURL.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/importURL.go b/cmd/importURL.go index 69c32e8e..e9c59227 100644 --- a/cmd/importURL.go +++ b/cmd/importURL.go @@ -117,13 +117,17 @@ func NewImportURLCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm } } - // Try downloading the artifcat + // Try downloading the artifact msg, err := mc.DownloadArtifact(f, mainArtifact, secret) if err != nil { - fmt.Printf("Got error when invoking Microcks client importing Artifact: %s", err) + fmt.Fprintf(os.Stderr, "Got error when invoking Microcks client importing Artifact: %s\n", err) os.Exit(1) } - fmt.Printf("Microcks has discovered '%s'\n", msg) + action := "discovered" + if !mainArtifact { + action = "imported" + } + fmt.Printf("Microcks has %s '%s'\n", action, msg) } }, }