2017-06-26 23:46:34 +02:00
|
|
|
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
|
2017-02-26 22:06:33 +01:00
|
|
|
|
2017-04-12 19:38:12 +02:00
|
|
|
package main
|
2017-02-26 22:06:33 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
2017-08-23 01:56:15 +02:00
|
|
|
"github.com/pulumi/pulumi-fabric/pkg/engine"
|
2017-08-02 18:25:22 +02:00
|
|
|
"github.com/pulumi/pulumi-fabric/pkg/util/cmdutil"
|
2017-02-26 22:06:33 +01:00
|
|
|
)
|
|
|
|
|
2017-03-06 15:32:39 +01:00
|
|
|
func newEnvLsCmd() *cobra.Command {
|
2017-02-26 22:06:33 +01:00
|
|
|
return &cobra.Command{
|
|
|
|
Use: "ls",
|
|
|
|
Aliases: []string{"list"},
|
2017-03-06 15:32:39 +01:00
|
|
|
Short: "List all known environments",
|
2017-04-12 20:12:25 +02:00
|
|
|
Run: cmdutil.RunFunc(func(cmd *cobra.Command, args []string) error {
|
2017-08-23 01:56:15 +02:00
|
|
|
return engine.ListEnvs()
|
2017-08-23 01:23:50 +02:00
|
|
|
}),
|
|
|
|
}
|
|
|
|
}
|