Skip to content

Commit b273fe1

Browse files
committed
Fix path checking in create
1 parent 827cb9e commit b273fe1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/create.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package cmd
33
import (
44
"fmt"
55
"path"
6+
"strings"
67

78
"github.com/commitdev/zero/internal/config/projectconfig"
89
"github.com/commitdev/zero/internal/constants"
@@ -28,7 +29,7 @@ var createCmd = &cobra.Command{
2829
}
2930

3031
func Create(dir string, createConfigPath string) {
31-
if createConfigPath == "" {
32+
if strings.Trim(createConfigPath, " ") == "" {
3233
exit.Fatal("config path cannot be empty!")
3334
}
3435
configFilePath := path.Join(dir, createConfigPath)

0 commit comments

Comments
 (0)