Skip to content

Commit 1db1ed4

Browse files
committed
feat: add ability to exit in add_to_autorun
1 parent 3608568 commit 1db1ed4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/add_to_autorun/add_to_autorun.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func (sm *ServiceManager) installService(batFilePath string) error {
129129

130130
func getOptions() []string {
131131
options := []string{
132+
"Exit",
132133
"Delete service from autorun",
133134
"Run BLOCKCHECK (Auto-setting BAT parameters)",
134135
}
@@ -167,7 +168,7 @@ func printWelcomeMessage(buf *bytes.Buffer) {
167168
"Author: ANKDDEV https://github.com/ankddev",
168169
fmt.Sprintf("Version: %s", version),
169170
"===",
170-
"\nUsing ARROWS on your keyboard, select BAT file from list for installing service 'discordfix_zapret' or select 'Delete service from autorun' or 'Run BLOCKCHECK (Auto-setting BAT parameters)'.\n",
171+
"\nUsing ARROWS on your keyboard, select BAT file from list for installing service 'discordfix_zapret' or select 'Delete service from autorun' or 'Run BLOCKCHECK (Auto-setting BAT parameters)' or select 'Exit'.\n",
171172
"For selection press ENTER.",
172173
}
173174

@@ -314,6 +315,8 @@ func main() {
314315
fmt.Printf("%s⚠ Error running BLOCKCHECK: %v%s\n", colorRed, err, colorReset)
315316
}
316317
return
318+
case "Exit":
319+
return
317320
default:
318321
batPath := filepath.Join("pre-configs", options[currentSelection])
319322
serviceManager.installService(batPath)

0 commit comments

Comments
 (0)