From e574fbc59f1a48c2cbaa4cd7d49d0f51bd9aef90 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:18:05 -0800 Subject: [PATCH] different fix --- NonSteamLaunchers.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 881678a..109f097 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -662,14 +662,13 @@ else fi done - # If command line arguments were provided, join the custom websites with commas - if [ ${#args[@]} -gt 0 ]; then - custom_websites_str=$(IFS=','; echo "${custom_websites[*]}") - else - custom_websites_str="${custom_websites[@]}" - fi + # Join the custom_websites array into a string with commas and spaces + custom_websites_str=$(IFS=', '; echo "${custom_websites[*]}") - echo "Custom websites: $custom_websites_str" + # Split the custom_websites_str variable back into an array using ',' as the delimiter + IFS=', ' read -ra custom_websites <<< "$custom_websites_str" + + # TODO: error handling for unbound variable $selected_launchers_str on line 564 # Convert the selected_launchers array to a string by joining its elements with a `|` delimiter.