Example #1
0
func (cmd *Push) fetchStackGUID(appParams *models.AppParams) error {
	if appParams.StackName == nil {
		return nil
	}

	stackName := *appParams.StackName
	cmd.ui.Say(T("Using stack {{.StackName}}...",
		map[string]interface{}{"StackName": terminal.EntityNameColor(stackName)}))

	stack, err := cmd.stackRepo.FindByName(stackName)
	if err != nil {
		return err
	}

	cmd.ui.Ok()
	appParams.StackGUID = &stack.GUID
	return nil
}