diff --git a/lug-helper.sh b/lug-helper.sh
index bec00a0..0a8e2fe 100755
--- a/lug-helper.sh
+++ b/lug-helper.sh
@@ -2331,6 +2331,15 @@ eac_workaround() {
fi
}
+# Format some URLs for Zenity
+format_urls() {
+ if [ "$use_zenity" -eq 1 ]; then
+ releases_url="$releases_url"
+ lug_wiki="$lug_wiki"
+ lug_wiki_nixos="$lug_wiki_nixos"
+ fi
+}
+
# Get a random Penguin's Star Citizen referral code
referral_randomizer() {
# Populate the referral codes array
@@ -2378,11 +2387,9 @@ fi
# Set defaults
live_or_ptu="$live_dir"
-# Format some URLs for Zenity
-if [ "$use_zenity" -eq 1 ]; then
- releases_url="$releases_url"
- lug_wiki="$lug_wiki"
- lug_wiki_nixos="$lug_wiki_nixos"
+# Format some URLs for Zenity if the Helper was not invoked with command-line arguments (handle those separately below)
+if [ "$#" -eq 0 ]; then
+ format_urls
fi
# Check if a newer verison of the script is available
@@ -2497,6 +2504,9 @@ Usage: lug-helper
shift
done
+ # Format some URLs for Zenity
+ format_urls
+
# Call the requested functions and exit
if [ "${#cargs[@]}" -gt 0 ]; then
for (( x=0; x<"${#cargs[@]}"; x++ )); do