From a1f5dd36d148be1e08e3b66a01cf88dd217bead1 Mon Sep 17 00:00:00 2001 From: Nahuel Quiroga Date: Tue, 29 Oct 2024 14:09:50 -0300 Subject: [PATCH] fix(lint): fixing variables --- .../scripts/easy-options/easyoptions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/fastapi-simple-docker-pip/scripts/easy-options/easyoptions.sh b/examples/fastapi-simple-docker-pip/scripts/easy-options/easyoptions.sh index b8b2822..d774a8b 100644 --- a/examples/fastapi-simple-docker-pip/scripts/easy-options/easyoptions.sh +++ b/examples/fastapi-simple-docker-pip/scripts/easy-options/easyoptions.sh @@ -106,7 +106,7 @@ parse_options() { # Prepare known options for option in "${options[@]}"; do option_var=${option#*=} - option_name=${option%=$option_var} + option_name=${option%="$option_var"} if [[ "${#option_name}" = "1" ]]; then short_options="${short_options}${option_name}" if [[ "${#option_var}" -gt "1" ]]; then @@ -123,7 +123,7 @@ parse_options() { parameters+=("$argument") for known_option in "${options[@]}"; do known_option_var=${known_option#*=} - known_option_name=${known_option%=$known_option_var} + known_option_name=${known_option%="$known_option_var"} if [[ "$known_option_var" = "?" && "$argument" = --$known_option_name ]]; then next_is_value="yes" break @@ -149,7 +149,7 @@ parse_options() { # Set the corresponding variable for known options for known_option in "${options[@]}" "${short_option_vars[@]}"; do known_option_var=${known_option#*=} - known_option_name=${known_option%=$known_option_var} + known_option_name=${known_option%="$known_option_var"} # Short option if [[ "$option" = "$known_option_name" ]]; then