Previously, the engine was concered with maintaing information about the currently active environment. Now, the CLI is in charge of this. As part of this change, the engine can now assume that every environment has a non empty name (and I've added asserts on the entrypoints of the engine API to ensure that any consumer of the engine passes a non empty environment name)
14 lines
312 B
Go
14 lines
312 B
Go
// Copyright 2017, Pulumi Corporation. All rights reserved.
|
|
|
|
package engine
|
|
|
|
import (
|
|
"github.com/pulumi/pulumi/pkg/tokens"
|
|
"github.com/pulumi/pulumi/pkg/util/contract"
|
|
)
|
|
|
|
func (eng *Engine) InitEnv(name tokens.QName) error {
|
|
contract.Require(name != tokens.QName(""), "name")
|
|
|
|
return eng.createEnv(name)
|
|
}
|