Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Commit

Permalink
Added check for template file
Browse files Browse the repository at this point in the history
Signed-off-by: kadern0 <kaderno@gmail.com>
  • Loading branch information
kadern0 committed Mar 4, 2020
1 parent ee11754 commit f7fb0d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/create_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/url"
"os"
"os/exec"
"path"
"runtime"
"strings"
"time"
Expand Down Expand Up @@ -64,6 +65,10 @@ func createGitHubAppE(command *cobra.Command, _ []string) error {
"GitHubEvent": fmt.Sprintf("%s://system.%s/github-event", scheme, rootDomain),
}

if _, err := os.Stat(path.Join("./pkg/github", "index.html")); err != nil {
return fmt.Errorf("Cannot find the template file. You need to run this command from the root directory of the repository.\n ")
}

fmt.Printf("Name: %s\tRoot domain: %s\tScheme: %v\n", name, rootDomain, scheme)

launchBrowser := true
Expand Down

0 comments on commit f7fb0d7

Please sign in to comment.