wisski-cloud-distillery/internal/wisski/ingredient/barrel/shell.go
2022-12-14 08:53:45 +01:00

12 lines
340 B
Go

package barrel
import (
"context"
"github.com/tkw1536/goprogram/stream"
)
// Shell executes a shell command inside the instance.
func (barrel *Barrel) Shell(ctx context.Context, io stream.IOStream, argv ...string) func() int {
return barrel.Stack().Exec(ctx, io, "barrel", "/bin/sh", append([]string{"/user_shell.sh"}, argv...)...)
}