Skip to content

Commit

Permalink
feat: add ability to exit in run_preconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
ankddev committed Dec 12, 2024
1 parent 1db1ed4 commit c23d953
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/run_preconfig/run_preconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func printWelcomeMessage(buf *bytes.Buffer) int {
"Author: ANKDDEV https://github.com/ankddev",
fmt.Sprintf("Version: %s", version),
"===",
"\nUsing ARROWS on your keyboard, select BAT file from list for running.\n",
"\nUsing ARROWS on your keyboard, select BAT file from list for running or select 'Run BLOCKCHECK (Auto-setting BAT parameters)' or select 'Exit'.\n",
"For selection press ENTER.",
}

Expand All @@ -82,6 +82,7 @@ var version string

func getOptions() []string {
options := []string{
"Exit",
"Run BLOCKCHECK (Auto-setting BAT parameters)",
}

Expand Down Expand Up @@ -261,6 +262,8 @@ func handleSelection(selected string) error {
return fmt.Errorf("%s⚠ Error running BLOCKCHECK: %v%s", colorRed, err, colorReset)
}
return nil
case "Exit":
return nil
default:
fmt.Print(showCursor + exitAltScreen)
keyboard.Close()
Expand Down

0 comments on commit c23d953

Please sign in to comment.