diff --git a/games/factorio_manager.sh b/games/factorio_manager.sh index e4b36b751d0160b1215157ebd2426b906b9be8d5..4a0e5233c50c2864e77338430163285e974dbaba 100755 --- a/games/factorio_manager.sh +++ b/games/factorio_manager.sh @@ -493,10 +493,18 @@ function validate_server_setting_value() { local result=1 if [[ $type == "bool" ]]; then - [[ $value == true || $value == false ]] && result=0 || colorecho "red" "$name must be a boolean [true|false]." + if [[ $value == true || $value == false ]]; then + result=0 + else + colorecho "red" "$name must be a boolean [true|false]." + fi elif [[ $type == "int" ]]; then - [[ $value =~ ^[[:digit:]]+$ ]] && result=0 || colorecho "red" "$name must be a number." + if [[ $value =~ ^[[:digit:]]+$ ]]; then + result=0 + else + colorecho "red" "$name must be a number." + fi elif [[ $type == "str" ]]; then result=0