diff options
| -rw-r--r-- | argv.custom.go | 2 | ||||
| -rw-r--r-- | main.go | 11 | ||||
| -rw-r--r-- | subCommand.go | 11 |
3 files changed, 9 insertions, 15 deletions
diff --git a/argv.custom.go b/argv.custom.go index 127d9a5..855b458 100644 --- a/argv.custom.go +++ b/argv.custom.go @@ -91,7 +91,7 @@ func (a args) SendCompletionStrings(pb *argvpb.Argv) { pb.SendStrings([]string{"once", "many", "mine", "favorites"}) os.Exit(0) } - if pb.Cmd == "" { + if pb.GetCmd() == "" { // these are base autocomplete strings matches := []string{"clean", "commit", "merge", "patch", "normal", "pull", "rebuild", "generate", "config"} matches = append(matches, "show", "add", "fixer", "dev", "verify", "mode", "gui", "whatchanged") @@ -60,7 +60,7 @@ func main() { // put things to do every time forge runs here doCoreChecks() - if me.argv.Cmd == "" { + if me.argv.GetCmd() == "" { // no command line arguments were given // do the default behavior and exit s, err := doDefaultBehavior() @@ -70,10 +70,15 @@ func main() { me.argv.GoodExit(s) } - log.Info("Starting forge with subcommand:", me.argv.Cmd) - + log.Info("Starting forge with subcommand:", me.argv.GetCmd()) s, err = doSubcommand() + // if the gui starts, it doesn't yet go to the end normally + if argv.Gui != nil { + me.myGui.Start() // loads the GUI toolkit + doGui() // start making our forge GUI + debug() // sits here forever + } // safe exits back to your shell (with timing and toolkit close) if err != nil { me.argv.BadExit(s, err) diff --git a/subCommand.go b/subCommand.go index 69b3db1..7935d11 100644 --- a/subCommand.go +++ b/subCommand.go @@ -5,16 +5,12 @@ package main import ( "go.wit.com/lib/gui/shell" - "go.wit.com/log" ) func doSubcommand() (string, error) { var s string var err error - log.Info("Starting forge with subcommand:", me.argv.Cmd) - - //// start standard argv subcommand processing here //// if argv.Dev != nil { // first find the repos or gopaths to operate on s, err = doDev() @@ -95,13 +91,6 @@ func doSubcommand() (string, error) { if argv.Verify != nil { s, err = doVerify() } - //// end standard argv subcommand processing here //// - // if the gui starts, it doesn't yet go to the end normally - if argv.Gui != nil { - me.myGui.Start() // loads the GUI toolkit - doGui() // start making our forge GUI - debug() // sits here forever - } return s, err } |
