Skip to content

Commit

Permalink
Add static dir to config
Browse files Browse the repository at this point in the history
  • Loading branch information
drew-harris committed Sep 10, 2023
1 parent acf0520 commit 4c58d13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

type Config struct {
ShulkerboxUrl string `yaml:"shulker_box_url"`
StaticDir string `yaml:"static_dir"`
PluginCopyPaths []string `yaml:"plugin_paths"`
}

Expand Down
4 changes: 3 additions & 1 deletion engine/hostengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ func (h *HostEngine) StartServer(log types.Logger) error {
}

h.server = exec.CommandContext(context, cmdtmp.Name, cmdtmp.Args...)
os.Setenv("STATIC_DIR", h.config.StaticDir)
log("static dir : " + h.config.StaticDir)
h.server.Env = os.Environ()
h.server.Dir = baseDir

// Display output
Expand Down Expand Up @@ -154,7 +157,6 @@ func (h *HostEngine) StartServer(log types.Logger) error {
return nil
}

// Not implemented
func (h *HostEngine) Shutdown() error {
if h.server != nil {
h.cancel()
Expand Down
5 changes: 0 additions & 5 deletions model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@ import (
"github.com/charmbracelet/bubbles/textinput"
"github.com/charmbracelet/bubbles/viewport"
tea "github.com/charmbracelet/bubbletea"
dtypes "github.com/docker/docker/api/types"
"github.com/drewharris/shulker/config"
"github.com/drewharris/shulker/engine"
"github.com/drewharris/shulker/types"
)

type ServerExec struct {
Connection dtypes.HijackedResponse
}

type Loggers struct {
error types.Logger
build types.Logger
Expand Down

0 comments on commit 4c58d13

Please sign in to comment.