Skip to content

Commit a65087d

Browse files
Pkg deploy from the same dir
1 parent fa720e9 commit a65087d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/common/pathx/pathx.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ func GlobOne(pathPattern string) (string, error) {
123123
}
124124

125125
func GlobAll(pathPattern string) ([]string, error) {
126-
dir := stringsx.BeforeLast(pathPattern, "/")
126+
var dir string
127+
if !strings.Contains(pathPattern, "/") {
128+
dir = "."
129+
} else {
130+
dir = stringsx.BeforeLast(pathPattern, "/")
131+
}
127132
if !Exists(dir) {
128133
return nil, nil
129134
}

0 commit comments

Comments
 (0)