Skip to content

Commit

Permalink
fix: move add kfiles code out the method ParseArgs
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Nov 30, 2023
1 parent 67a01bb commit 8e71299
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/kcl/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func GetSchemaType(file, code, schemaName string) ([]*gpyrpc.KclType, error) {
}

func GetFullSchemaType(pathList []string, schemaName string, opts ...Option) ([]*gpyrpc.KclType, error) {

opts = append(opts, *NewOption().Merge(WithKFilenames(pathList...)))
args, err := ParseArgs(pathList, opts...)
if err != nil {
return nil, err
Expand Down
1 change: 0 additions & 1 deletion pkg/kcl/opt.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func ParseArgs(pathList []string, opts ...Option) (Option, error) {
tmpOptList = append(tmpOptList, WithSettings(s))
case isDir(s):
tmpOptList = append(tmpOptList, WithWorkDir(s))
tmpOptList = append(tmpOptList, WithKFilenames(s))
default:
tmpOptList = append(tmpOptList, WithKFilenames(s))
}
Expand Down

0 comments on commit 8e71299

Please sign in to comment.