We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 32076e2 + 8909b65 commit e73447aCopy full SHA for e73447a
1 file changed
client-go/pkg/git/git.go
@@ -4,7 +4,9 @@ import (
4
"errors"
5
"fmt"
6
"io/ioutil"
7
+ "os"
8
"os/exec"
9
+ "path"
10
"strings"
11
)
12
@@ -72,8 +74,10 @@ func remoteNameFromAppID(appID string) (string, error) {
72
74
func DetectAppName(host string) (string, error) {
73
75
remote, err := findRemote(host)
76
77
+ // Don't return an error if remote can't be found, return directory name instead.
78
if err != nil {
- return "", err
79
+ dir, err := os.Getwd()
80
+ return strings.ToLower(path.Base(dir)), err
81
}
82
83
ss := strings.Split(remote, "/")
0 commit comments