pkg/environment: Remove exec related functions
This commit starts the migration to remove the environment package. It introduced an abstraction that is not being used, and removing it makes the code simpler to maintain. This commit removes all 'exec' related package.
This commit is contained in:
parent
066390e30d
commit
14bb7f1086
6 changed files with 32 additions and 25 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
"github.com/FAU-CDI/wisski-distillery/internal/cli"
|
||||
"github.com/FAU-CDI/wisski-distillery/internal/dis/component"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/environment"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/execx"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/fsx"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
|
||||
"github.com/tkw1536/goprogram/exit"
|
||||
|
|
@ -195,7 +196,7 @@ func (si systemupdate) mustExec(context wisski_distillery.Context, workdir strin
|
|||
if workdir == "" {
|
||||
workdir = dis.Config.Paths.Root
|
||||
}
|
||||
code := dis.Still.Environment.Exec(context.Context, context.IOStream, workdir, exe, argv...)()
|
||||
code := execx.Exec(context.Context, context.IOStream, workdir, exe, argv...)()
|
||||
if code != 0 {
|
||||
err := errMustExecFailed.WithMessageF(code)
|
||||
err.ExitCode = exit.ExitCode(code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue