diff --git a/cli/app/list.go b/cli/app/list.go index 443a5422..50fdf21d 100644 --- a/cli/app/list.go +++ b/cli/app/list.go @@ -143,9 +143,13 @@ Use "--status/-S" flag to query all servers for the live deployment status.`, var newUpdates []string if version != "unknown" { + if err := app.Recipe.EnsureExists(); err != nil { + log.Fatalf("unable to clone %s: %s", app.Name, err) + } + updates, err := app.Recipe.Tags() if err != nil { - log.Fatal(err) + log.Fatalf("unable to retrieve tags for %s: %s", app.Name, err) } parsedVersion, err := tagcmp.Parse(version) diff --git a/pkg/git/clone.go b/pkg/git/clone.go index 750bc1a3..789f9a04 100644 --- a/pkg/git/clone.go +++ b/pkg/git/clone.go @@ -25,7 +25,7 @@ func gitCloneIgnoreErr(err error) bool { // Clone runs a git clone which accounts for different default branches. func Clone(dir, url string) error { if _, err := os.Stat(dir); os.IsNotExist(err) { - log.Debugf("git clone: %s", dir, url) + log.Debugf("git clone: %s", url) _, err := git.PlainClone(dir, false, &git.CloneOptions{ URL: url, diff --git a/tests/integration/app_list.bats b/tests/integration/app_list.bats index 2cc4ec55..5f662e28 100644 --- a/tests/integration/app_list.bats +++ b/tests/integration/app_list.bats @@ -8,6 +8,7 @@ setup_file(){ } teardown_file(){ + _undeploy_app _rm_app _rm_server } @@ -98,3 +99,17 @@ teardown(){ assert_output --partial "$expectedOutput" } + +# bats test_tags=slow +@test "list with status fetches recipe" { + _deploy_app + + run $ABRA app ls --status + assert_success + + run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE" + assert_success + + run $ABRA app ls --status + assert_success +}