func NewRuntime(parentLogger logger.Logger, configuration *Configuration) (runtime.Runtime, error) {
	runtimeLogger := parentLogger.GetChild("shell")
	abstractRuntime, err := runtime.NewAbstractRuntime(runtimeLogger, configuration.Configuration)
	if err != nil {
		return nil, errors.Wrap(err, "Failed to create abstract runtime")
	}
	newShellRuntime := &shell{
		AbstractRuntime: abstractRuntime,
		ctx:             context.Background(),
		configuration:   configuration,
	}
	newShellRuntime.command, err = newShellRuntime.getCommand()
	if err != nil {
		return nil, errors.Wrap(err, "Failed to get command")
	}
	newShellRuntime.env = newShellRuntime.getEnvFromConfiguration()
	newShellRuntime.restartChannel = make(chan struct{}, 1)
	newShellRuntime.commandInPath, err = newShellRuntime.commandIsInPath()
	if err != nil {
		newShellRuntime.Logger.ErrorWith("Failed checking if command is in PATH",
			"name", newShellRuntime.configuration.Meta.Name,
			"version", newShellRuntime.configuration.Spec.Version,
			"command", newShellRuntime.command,
			"err", err)
		return nil, errors.Wrap(err, "Failed checking if command is in PATH")
	}
	newShellRuntime.SetStatus(status.Ready)
	return newShellRuntime, nil
}
NewRuntime returns a new shell runtime
package shell
import (
	"context"
	"fmt"
	"net/http"
	"os"
	"os/exec"
	"path"
	"strings"
	"time"
	"github.com/nuclio/nuclio/pkg/common"
	"github.com/nuclio/nuclio/pkg/common/status"
	"github.com/nuclio/nuclio/pkg/functionconfig"
	"github.com/nuclio/nuclio/pkg/processor/runtime"
	"github.com/nuclio/errors"
	"github.com/nuclio/logger"
	"github.com/nuclio/nuclio-sdk-go"
)
type shell struct {
	*runtime.AbstractRuntime
	configuration  *Configuration
	command        string
	env            []string
	commandInPath  bool
	ctx            context.Context
	restartChannel chan struct{}
}