forked from toolshed/abra
fix: find local only apps
This commit is contained in:
@ -48,14 +48,33 @@ func ValidateRecipeWithPrompt(c *cli.Context) recipe.Recipe {
|
||||
recipeName := c.Args().First()
|
||||
|
||||
if recipeName == "" && !NoInput {
|
||||
var recipes []string
|
||||
|
||||
catl, err := catalogue.ReadRecipeCatalogue()
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
var recipes []string
|
||||
|
||||
knownRecipes := make(map[string]bool)
|
||||
for name := range catl {
|
||||
recipes = append(recipes, name)
|
||||
knownRecipes[name] = true
|
||||
}
|
||||
|
||||
localRecipes, err := recipe.GetRecipesLocal()
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
for _, recipeLocal := range localRecipes {
|
||||
if _, ok := knownRecipes[recipeLocal]; !ok {
|
||||
knownRecipes[recipeLocal] = true
|
||||
}
|
||||
}
|
||||
|
||||
for recipeName := range knownRecipes {
|
||||
recipes = append(recipes, recipeName)
|
||||
}
|
||||
|
||||
prompt := &survey.Select{
|
||||
Message: "Select recipe",
|
||||
Options: recipes,
|
||||
|
@ -97,11 +97,6 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
||||
}
|
||||
|
||||
for _, service := range recipe.Config.Services {
|
||||
catlVersions, err := catalogue.VersionsOfService(recipe.Name, service.Name)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
img, err := reference.ParseNormalizedNamed(service.Image)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
@ -152,6 +147,11 @@ You may invoke this command in "wizard" mode and be prompted for input:
|
||||
continue // skip on to the next tag and don't update any compose files
|
||||
}
|
||||
|
||||
catlVersions, err := catalogue.VersionsOfService(recipe.Name, service.Name)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
var compatibleStrings []string
|
||||
for _, compat := range compatible {
|
||||
skip := false
|
||||
|
Reference in New Issue
Block a user