Skip to content

Commit

Permalink
bugfix(plugin): Main sdk information not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
aooohan committed Mar 7, 2024
1 parent 6a95418 commit 9151cf2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ func (l *LuaPlugin) EnvKeys(sdkPackage *Package) (env.Envs, error) {
L := l.state
mainInfo := sdkPackage.Main
sdkArr := L.NewTable()
sdkTable := l.createSdkInfoTable(mainInfo)
L.SetField(sdkArr, mainInfo.Name, sdkTable)

This comment has been minimized.

Copy link
@bytemain

bytemain Mar 7, 2024

Member

why use mainInfo.Name as a table key? I think it should be main or current

This comment has been minimized.

Copy link
@bytemain

bytemain Mar 7, 2024

Member

because of in #83 I want define all ctx as struct

This comment has been minimized.

Copy link
@aooohan

aooohan Mar 7, 2024

Author Member

because of in #83 I want define all ctx as struct

Oh, I see. I first thought I'd put them all in sdkInfos, since they have same struct. I will change this as #83.

for _, v := range sdkPackage.Additions {
sdkTable := l.createSdkInfoTable(v)
L.SetField(sdkArr, v.Name, sdkTable)
Expand Down

0 comments on commit 9151cf2

Please sign in to comment.