Skip to content

Commit de89609

Browse files
committed
cnf model updated
1 parent b0ed956 commit de89609

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

controllers/pv.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ func cnfFunc(command string, filepath string, modOrFile string) (string, string)
6868
filepath, err = os.Getwd()
6969
errors.ErrorHandle(err)
7070
modOrFile = project.Commands[i].Option
71+
if modOrFile == "file" {
72+
filepath = project.Commands[i].Path
73+
}
7174
}
7275
}
7376
cliTools.CheckModOrPath(modOrFile, filepath)

models/cnf.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package models
33
type Command struct {
44
Name string `json:"name"`
55
Option string `json:"file"`
6+
Path string `json:"path"` // optional, for single file support
67
}
78

89
type Var struct {

0 commit comments

Comments
 (0)