mirror of
https://github.com/mcuadros/ascode
synced 2024-11-23 01:11:59 +01:00
4542cf80bd
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
27 lines
499 B
Go
27 lines
499 B
Go
package cmd
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/ascode-dev/ascode/starlark/runtime"
|
|
"github.com/ascode-dev/ascode/terraform"
|
|
)
|
|
|
|
func init() {
|
|
log.SetOutput(ioutil.Discard)
|
|
}
|
|
|
|
type commonCmd struct {
|
|
PluginDir string `long:"plugin-dir" description:"directory containing plugin binaries" default:"$HOME/.terraform.d/plugins"`
|
|
|
|
runtime *runtime.Runtime
|
|
}
|
|
|
|
func (c *commonCmd) init() {
|
|
c.runtime = runtime.NewRuntime(&terraform.PluginManager{
|
|
Path: os.ExpandEnv(c.PluginDir)},
|
|
)
|
|
}
|