Skip to content

Commit cad0e19

Browse files
committed
fix: entry with pkg alias
Signed-off-by: peefy <[email protected]>
1 parent 866202d commit cad0e19

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

Diff for: VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.8.6
1+
0.8.7

Diff for: pkg/options/run.go

+11-2
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,22 @@ func (o *RunOptions) Run() error {
118118
opts.SetPkgPath(pwd)
119119
result, err = cli.CompileWithOpts(opts)
120120
} else {
121-
// If there is only kcl file without kcl package (kcl.mod)
121+
// TODO: refactor the entry search logic.
122+
depsOpt, depErr := LoadDepsFrom(pwd, o.Quiet)
123+
if depErr != nil {
124+
return err
125+
}
126+
opts.Merge(*depsOpt)
122127
result, err = api.RunWithOpt(opts)
123128
}
124129
} else {
125130
// kcl compiles the package from the local file system, tar and OCI package, etc.
126131
if entry.IsLocalFile() {
127-
// If there is only kcl file without kcl package (kcl.mod)
132+
depsOpt, depErr := LoadDepsFrom(pwd, o.Quiet)
133+
if depErr != nil {
134+
return err
135+
}
136+
opts.Merge(*depsOpt)
128137
result, err = api.RunWithOpt(opts)
129138
} else if entry.IsLocalFileWithKclMod() {
130139
// Else compile the kcl package (kcl.mod)

Diff for: pkg/version/version.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ func getVersion(version string) string {
3232
}
3333

3434
const (
35-
VersionTypeLatest = Version_0_8_6
35+
VersionTypeLatest = Version_0_8_7
3636

37-
Version_0_8_6 VersionType = "0.8.6"
37+
Version_0_8_7 VersionType = "0.8.7"
38+
Version_0_8_6 VersionType = "0.8.7"
3839
Version_0_8_5 VersionType = "0.8.5"
3940
Version_0_8_4 VersionType = "0.8.4"
4041
Version_0_8_3 VersionType = "0.8.3"

0 commit comments

Comments
 (0)