Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: errors were not beind displayed properly in a few places #894

Merged
merged 2 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmd/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions environment/container/dockerengine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down