From 175814e50e255b0859a05f7be3446830cfd309d9 Mon Sep 17 00:00:00 2001 From: Harikrishnan Balagopal Date: Tue, 11 Oct 2022 14:36:33 +0530 Subject: [PATCH 1/2] chore: errors were not beind displayed properly in a few places Signed-off-by: Harikrishnan Balagopal --- cmd/collect.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/collect.go b/cmd/collect.go index ae542c404..03a2de528 100644 --- a/cmd/collect.go +++ b/cmd/collect.go @@ -42,21 +42,21 @@ func collectHandler(flags collectFlags) { if outpath != "" { if outpath, err = filepath.Abs(outpath); err != nil { - logrus.Fatalf("Failed to make the output directory path %q absolute. Error: %q", outpath, err) + logrus.Fatalf("Failed to make the output directory path '%s' absolute. Error: %q", outpath, err) } } if srcpath != "" { srcpath, err = filepath.Abs(srcpath) if err != nil { - logrus.Fatalf("Failed to make the source directory path %q absolute. Error: %q", srcpath, err) + logrus.Fatalf("Failed to make the source directory path '%s' absolute. Error: %q", srcpath, err) } fi, err := os.Stat(srcpath) if os.IsNotExist(err) { - logrus.Fatalf("Source directory does not exist: %s.", err) + logrus.Fatalf("Source directory '%s' does not exist. Error: %q", srcpath, err) } else if err != nil { - logrus.Fatalf("Error while accessing directory: %s. ", srcpath) + logrus.Fatalf("Error while accessing directory: '%s' . Error: %q", srcpath, err) } else if !fi.IsDir() { - logrus.Fatalf("Source path is a file, expected directory: %s.", srcpath) + logrus.Fatalf("Source path is a file, expected '%s' to be a directory.", srcpath) } } outpath = filepath.Join(filepath.Clean(outpath), types.AppNameShort+"_collect") From 91307300b8a277679093bd3aeea0f6b20ba5d748 Mon Sep 17 00:00:00 2001 From: Harikrishnan Balagopal Date: Tue, 11 Oct 2022 14:56:20 +0530 Subject: [PATCH 2/2] fixup! chore: errors were not beind displayed properly in a few places Signed-off-by: Harikrishnan Balagopal --- environment/container/dockerengine_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment/container/dockerengine_test.go b/environment/container/dockerengine_test.go index b8610b173..4916e0a11 100644 --- a/environment/container/dockerengine_test.go +++ b/environment/container/dockerengine_test.go @@ -27,7 +27,7 @@ func TestIsBuilderAvailable(t *testing.T) { t.Run("normal use case", func(t *testing.T) { provider, _ := newDockerEngine() - image := "quay.io/konveyor/move2kube" + image := "quay.io/konveyor/move2kube-api" // Test if err := provider.pullImage(image); err != nil { @@ -37,7 +37,7 @@ func TestIsBuilderAvailable(t *testing.T) { t.Run("normal use case where we get result from cache", func(t *testing.T) { provider, _ := newDockerEngine() - image := "quay.io/konveyor/move2kube" + image := "quay.io/konveyor/move2kube-api" // Test if err := provider.pullImage(image); err != nil {