2017-06-26 23:46:34 +02:00
|
|
|
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
|
2016-11-15 20:30:34 +01:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
2017-08-23 02:46:06 +02:00
|
|
|
|
|
|
|
"github.com/pulumi/pulumi-fabric/pkg/engine"
|
2016-11-15 20:30:34 +01:00
|
|
|
)
|
|
|
|
|
2017-08-23 19:58:35 +02:00
|
|
|
var (
|
2017-08-25 03:00:22 +02:00
|
|
|
// The lumi engine provides an API for common lumi tasks. It's shared across the
|
|
|
|
// `lumi` command and the deployment engine in the pulumi-service. For `lumi` we set
|
|
|
|
// the engine to write output and errors to os.Stdout and os.Stderr.
|
2017-08-23 19:58:35 +02:00
|
|
|
lumiEngine engine.Engine
|
|
|
|
)
|
2017-08-23 02:46:06 +02:00
|
|
|
|
2017-08-23 19:58:35 +02:00
|
|
|
func init() {
|
2017-08-31 19:27:41 +02:00
|
|
|
lumiEngine = engine.Engine{Stdout: os.Stdout, Stderr: os.Stderr, Environment: localEnvProvider{}}
|
2017-08-23 19:58:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
2017-05-18 20:38:28 +02:00
|
|
|
if err := NewLumiCmd().Execute(); err != nil {
|
2016-11-17 16:00:52 +01:00
|
|
|
fmt.Fprintf(os.Stderr, "An error occurred: %v\n", err)
|
2016-11-15 20:30:34 +01:00
|
|
|
os.Exit(-1)
|
|
|
|
}
|
|
|
|
}
|