|
@@ -90,7 +90,8 @@ func parseTomlFromFile(filePath string) (PestConfig, error) {
|
|
|
func gitGetHead(filePath string) (string, string) {
|
|
|
gitObj, err := git.PlainOpen(filePath)
|
|
|
if err != nil {
|
|
|
- panic(err)
|
|
|
+ // Likely not a git dir, return empty
|
|
|
+ return "", ""
|
|
|
}
|
|
|
|
|
|
headRef, err := gitObj.Head()
|
|
@@ -209,7 +210,7 @@ func assemble_prompt(config *PestConfig) {
|
|
|
|
|
|
func main() {
|
|
|
|
|
|
- toml, err := parseTomlFromFile("./pest.cfg")
|
|
|
+ toml, err := parseTomlFromFile("/home/swatson/Repos/go-pest/pest.cfg")
|
|
|
if err != nil {
|
|
|
fmt.Println("Couldn't parse TOML const!")
|
|
|
}
|