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

Commit 19a7220

Browse files
kadern0alexellis
authored andcommitted
Added check for template file
Signed-off-by: kadern0 <kaderno@gmail.com>
1 parent b2e1794 commit 19a7220

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/create_github.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/url"
88
"os"
99
"os/exec"
10+
"path"
1011
"runtime"
1112
"strings"
1213
"time"
@@ -64,6 +65,10 @@ func createGitHubAppE(command *cobra.Command, _ []string) error {
6465
"GitHubEvent": fmt.Sprintf("%s://system.%s/github-event", scheme, rootDomain),
6566
}
6667

68+
if _, err := os.Stat(path.Join("./pkg/github", "index.html")); err != nil {
69+
return fmt.Errorf(`cannot find template "index.html", run this command from the ofc-bootstrap repository`)
70+
}
71+
6772
fmt.Printf("Name: %s\tRoot domain: %s\tScheme: %v\n", name, rootDomain, scheme)
6873

6974
launchBrowser := true

0 commit comments

Comments
 (0)