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

Added check for template file #197

Merged
merged 1 commit into from
Mar 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spot on 👍

return fmt.Errorf(`cannot find template "index.html", run this command from the ofc-bootstrap repository`)
}

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

launchBrowser := true
Expand Down