summaryrefslogtreecommitdiff
path: root/apps/compiler/compiler.sh
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2025-09-04 11:47:44 +0200
committerGitHub <noreply@github.com>2025-09-04 11:47:44 +0200
commitc9e1782d7a902b24439e2d55f4ae9ccf0c7c82af (patch)
tree76fb6247d61ce7ccabc9788f14dfe59748c3acd2 /apps/compiler/compiler.sh
parent300ed47bc48123067cde95b3456dff3accc72b45 (diff)
Refactor menu command handling for direct execution (#22791)
Diffstat (limited to 'apps/compiler/compiler.sh')
-rwxr-xr-xapps/compiler/compiler.sh19
1 files changed, 2 insertions, 17 deletions
diff --git a/apps/compiler/compiler.sh b/apps/compiler/compiler.sh
index aa845b6998..e27b35c2de 100755
--- a/apps/compiler/compiler.sh
+++ b/apps/compiler/compiler.sh
@@ -49,7 +49,7 @@ function handle_compiler_command() {
;;
"quit")
echo "Closing compiler menu..."
- exit 0
+ return 0
;;
*)
echo "Invalid option. Use --help to see available commands."
@@ -61,20 +61,5 @@ function handle_compiler_command() {
# Hook support (preserved from original)
runHooks "ON_AFTER_OPTIONS" # you can create your custom options
-# Legacy switch function (preserved for compatibility)
-function _switch() {
- local reply="$1"
- local opt="$2"
-
- case "$reply" in
- ""|"--help")
- menu_show_help
- ;;
- *)
- run_option "$reply" "$opt"
- ;;
- esac
-}
-
# Run the menu system
-menu_run "ACORE COMPILER" handle_compiler_command "${comp_menu_items[@]}" "$@"
+menu_run_with_items "ACORE COMPILER" handle_compiler_command -- "${comp_menu_items[@]}" -- "$@"