Skip to content

Commit

Permalink
Show help message with no stack file and flags
Browse files Browse the repository at this point in the history
Signed-off-by: Yankee Maharjan <yankee.exe@gmail.com>
  • Loading branch information
yankeexe authored and alexellis committed Jun 24, 2021
1 parent 72816d4 commit 38f6230
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions commands/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package commands

import (
"fmt"
"os"
"sort"

v2 "github.com/openfaas/faas-cli/schema/store/v2"
Expand Down Expand Up @@ -150,6 +151,11 @@ func runGenerate(cmd *cobra.Command, args []string) error {
if parsedServices != nil {
services = *parsedServices
}
} else {
fmt.Println(
`"stack.yml" file not found in the current directory.
Use "--yaml" to pass a file or "--from-store" to generate using function store.`)
os.Exit(1)
}

branch, version, err := builder.GetImageTagValues(tagFormat)
Expand Down

0 comments on commit 38f6230

Please sign in to comment.