Skip to content

Commit

Permalink
cli/cli: Fix panic on module access
Browse files Browse the repository at this point in the history
  • Loading branch information
foxcpp committed Jan 30, 2025
1 parent d712d8c commit 95ba6bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/cli/ctl/moduleinit.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func getCfgBlockModule(ctx *cli.Context) (*container.C, module.Module, error) {
}

c := container.New()
container.Global = c

cfg, err := maddy.ReadConfig(cfgPath)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/table/sql_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ func (s *SQL) Configure(inlineArgs []string, cfg *config.Map) error {
return nil
}

return nil
return s.prepare()
}

func (s *SQL) Start() error {
return s.prepare()
return nil
}

func (s *SQL) Stop() error {
Expand Down

0 comments on commit 95ba6bf

Please sign in to comment.