From 4514df1853b2ef6ac6858c91f953a385680235b5 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Sat, 9 Jan 2021 17:32:30 -0800 Subject: [PATCH] remove broken "dagger create" command Signed-off-by: Solomon Hykes --- cmd/dagger/cmd/create.go | 35 ----------------------------------- cmd/dagger/cmd/root.go | 4 +--- 2 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 cmd/dagger/cmd/create.go diff --git a/cmd/dagger/cmd/create.go b/cmd/dagger/cmd/create.go deleted file mode 100644 index 72f6c6aa..00000000 --- a/cmd/dagger/cmd/create.go +++ /dev/null @@ -1,35 +0,0 @@ -package cmd - -import ( - "fmt" - "io/ioutil" - "os" - - "dagger.cloud/go/dagger/ui" - "github.com/spf13/cobra" -) - -var createCmd = &cobra.Command{ - Use: "create ENV BASE", - Short: "Create an env", - Args: cobra.ExactArgs(2), - Run: func(cmd *cobra.Command, args []string) { - envname := args[0] - base := args[1] - envdir := ".dagger/env/" + envname - if info, err := os.Stat(envdir); err == nil { - if info.IsDir() { - ui.Fatalf("env already exists: %s", envname) - } - } - if err := os.MkdirAll(envdir, 0755); err != nil { - ui.Fatal(err) - } - baseCue := fmt.Sprintf("package env\nimport base \"%s\"\nbase\n", base) - err := ioutil.WriteFile(envdir+"/base.cue", []byte(baseCue), 0644) - if err != nil { - ui.Fatal(err) - } - ui.Info("created environment %q with base %q", envname, base) - }, -} diff --git a/cmd/dagger/cmd/root.go b/cmd/dagger/cmd/root.go index 81a4638f..23a763aa 100644 --- a/cmd/dagger/cmd/root.go +++ b/cmd/dagger/cmd/root.go @@ -14,11 +14,9 @@ func init() { // --debug rootCmd.PersistentFlags().Bool("debug", false, "Enable debug mode") // --workspace - rootCmd.PersistentFlags().StringP("workspace", "w", "", "Select workspace") rootCmd.AddCommand( - // Create an env - createCmd, computeCmd, + // Create an env // Change settings on an env // View or edit env serti // settingsCmd,