<commit_before>package dev

import (
	"github.com/spf13/cobra"

	"github.com/nanobox-io/nanobox/processor"
	"github.com/nanobox-io/nanobox/util/print"
	"github.com/nanobox-io/nanobox/validate"
)

// ConsoleCmd ...
var ConsoleCmd = &cobra.Command{
	Use:    "console",
	Short:  "Opens an interactive console inside your Nanobox VM.",
	Long:   ``,
	PreRun: validate.Requires("provider"),
	Run:    consoleFn,
}

// consoleFn ...
func consoleFn(ccmd *cobra.Command, args []string) {
	processor.DefaultControl.Env = "dev"

	// if given an arguement they wanted to run a console into a container
	// if no arguement is provided they wanted to run a dev console 
	// and be dropped into a dev environment
	if len(args) > 0 {
		processor.DefaultControl.Meta["container"] = args[0]
		print.OutputCommandErr(processor.Run("env_console", processor.DefaultControl))
		return
	}<commit_msg>Fixing bad reference of len to length<commit_after>package dev

import (
	"github.com/spf13/cobra"

	"github.com/nanobox-io/nanobox/processor"
	"github.com/nanobox-io/nanobox/util/print"
	"github.com/nanobox-io/nanobox/validate"
)

// ConsoleCmd ...
var ConsoleCmd = &cobra.Command{
	Use:    "console",
	Short:  "Opens an interactive console inside your Nanobox VM.",
	Long:   ``,
	PreRun: validate.Requires("provider"),
	Run:    consoleFn,
}

// consoleFn ...
func consoleFn(ccmd *cobra.Command, args []string) {
	processor.DefaultControl.Env = "dev"

	// if given an argument they wanted to run a console into a container
	// if no arguement is provided they wanted to run a dev console 
	// and be dropped into a dev environment
	if len(args) > 0 {
		processor.DefaultControl.Meta["container"] = args[0]
		print.OutputCommandErr(processor.Run("env_console", processor.DefaultControl))
		return
	}
{'fraction_non_alphanumeric': 0.12619718309859154, 'fraction_numerical': 0.004507042253521127, 'mean_word_length': 4.002816901408451, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5412706', 'n_tokens_mistral': 620, 'n_tokens_neox': 583, 'n_words': 156}