Skip to content

Commit

Permalink
fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-chiorean committed Sep 23, 2021
1 parent 167b99a commit ac2678a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/activate.go
Expand Up @@ -20,12 +20,12 @@ type activateCmd struct {
ShortPrompt bool `help:"Use a minimal prompt in active environments." hidden:""`
}

func (a *activateCmd) Run(l *ui.UI, sta *state.State, globalEnv envars.Envars, config *Config) error {
func (a *activateCmd) Run(l *ui.UI, sta *state.State, globalState GlobalState, config *Config) error {
realdir, err := resolveActivationDir(a.Dir)
if err != nil {
return errors.WithStack(err)
}
env, err := hermit.OpenEnv(realdir, sta, globalEnv, config.normalHTTPClient())
env, err := hermit.OpenEnv(realdir, sta, globalState.Env, config.normalHTTPClient())
if err != nil {
return errors.WithStack(err)
}
Expand Down
5 changes: 2 additions & 3 deletions app/exec.go
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"github.com/cashapp/hermit"
"github.com/cashapp/hermit/envars"
"github.com/cashapp/hermit/manifest"
"github.com/cashapp/hermit/state"
"github.com/cashapp/hermit/ui"
Expand All @@ -21,13 +20,13 @@ type execCmd struct {
Args []string `arg:"" help:"Arguments to pass to executable (use -- to separate)." optional:""`
}

func (e *execCmd) Run(l *ui.UI, sta *state.State, env *hermit.Env, globalEnv envars.Envars, config *Config) error {
func (e *execCmd) Run(l *ui.UI, sta *state.State, env *hermit.Env, globalState GlobalState, config *Config) error {
envDir, err := hermit.EnvDirFromProxyLink(e.Binary)
if err != nil {
return errors.WithStack(err)
}
if env == nil {
env, err = hermit.OpenEnv(envDir, sta, globalEnv, config.normalHTTPClient())
env, err = hermit.OpenEnv(envDir, sta, globalState.Env, config.normalHTTPClient())
if err != nil {
return errors.WithStack(err)
}
Expand Down

0 comments on commit ac2678a

Please sign in to comment.