From c9e1782d7a902b24439e2d55f4ae9ccf0c7c82af Mon Sep 17 00:00:00 2001 From: Yehonal Date: Thu, 4 Sep 2025 11:47:44 +0200 Subject: Refactor menu command handling for direct execution (#22791) --- apps/compiler/compiler.sh | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'apps/compiler/compiler.sh') 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[@]}" -- "$@" -- cgit v1.2.3