mirror of
https://github.com/mcuadros/ascode
synced 2024-11-26 14:03:49 +01:00
e1c229b80c
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
27 lines
495 B
Go
27 lines
495 B
Go
package cmd
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/mcuadros/ascode/starlark/runtime"
|
|
"github.com/mcuadros/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)},
|
|
)
|
|
}
|