Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #24 from compose/depnamefixes
Browse files Browse the repository at this point in the history
Recipes didn't do name resolution - fixed
  • Loading branch information
codepope authored Jul 5, 2018
2 parents 462125f + db62ebf commit 3294815
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/recipes.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ var recipesCmd = &cobra.Command{
log.Fatal("Need a deployment id to show recipes for")
}
c := getComposeAPI()
depid, err := resolveDepID(c, args[0])
if err != nil {
log.Fatal(err)
}
if outputRaw {
text, errs := c.GetRecipesForDeploymentJSON(args[0])
text, errs := c.GetRecipesForDeploymentJSON(depid)
bailOnErrs(errs)
fmt.Println(text)
} else {
recipes, errs := c.GetRecipesForDeployment(args[0])
recipes, errs := c.GetRecipesForDeployment(depid)
bailOnErrs(errs)
if !outputJSON {
for _, v := range *recipes {
Expand Down

0 comments on commit 3294815

Please sign in to comment.