From 02ecb95d1270b78ad9d87bd3c8fc22fd0f2dfa1b Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Sat, 26 Aug 2023 10:21:29 -0400 Subject: [PATCH] Use "--env" instead of "-path" for consistency in "env doctor" subcommand --- cmd/doctor.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cmd/doctor.go b/cmd/doctor.go index 86e7f90..5d07d02 100644 --- a/cmd/doctor.go +++ b/cmd/doctor.go @@ -9,7 +9,6 @@ import ( "github.com/spf13/cobra" "github.com/asmaloney/gactar/util/chalk" - "github.com/asmaloney/gactar/util/cli" "github.com/asmaloney/gactar/util/executil" "github.com/asmaloney/gactar/util/filesystem" "github.com/asmaloney/gactar/util/lisp" @@ -25,12 +24,7 @@ var doctorCmd = &cobra.Command{ Use: "doctor", Short: "Check an environment for problems", RunE: func(cmd *cobra.Command, args []string) (err error) { - envPath, err := expandPathFlag(cmd.Flags(), "path") - if err != nil { - return - } - - err = cli.SetupPaths(envPath) + envPath, err := setupVirtualEnvironment(cmd.Flags()) if err != nil { return } @@ -50,8 +44,6 @@ var doctorCmd = &cobra.Command{ func init() { envCmd.AddCommand(doctorCmd) - - doctorCmd.Flags().StringP("path", "p", "./env", "environment to check") } func outputSectionHeader(text string) {