diff --git a/cmd/root.go b/cmd/root.go index ff4cfcf..0742ba1 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -189,10 +189,6 @@ func setupForRun(cmd *cobra.Command) (settings *cli.Settings, err error) { settings.ActiveFrameworks = frameworks - context := cli.NewContext(cmd.Context(), settings) - - cmd.SetContext(context) - return } diff --git a/util/cli/cli.go b/util/cli/cli.go index df480dd..45f2716 100644 --- a/util/cli/cli.go +++ b/util/cli/cli.go @@ -2,7 +2,6 @@ package cli import ( - "context" "errors" "fmt" "os" @@ -10,6 +9,7 @@ import ( "runtime" "github.com/asmaloney/gactar/framework" + "github.com/asmaloney/gactar/util/filesystem" ) @@ -25,23 +25,6 @@ type Settings struct { Version string // the version string for output to command line } -type settingsKey string - -var contextKey settingsKey = "cli" - -func NewContext(ctx context.Context, u *Settings) context.Context { - return context.WithValue(ctx, contextKey, u) -} - -func FromContext(ctx context.Context) (*Settings, error) { - u, ok := ctx.Value(contextKey).(*Settings) - - if !ok { - return nil, ErrInvalidContext - } - - return u, nil -} // SetupPaths will set PATH and VIRTUAL_ENV environment variables to our environment path. func SetupPaths(envPath string) (err error) {