From 4363775501d38a6e316385b9349be95484d8e624 Mon Sep 17 00:00:00 2001
From: Andrew Steel <dev@andrewsteel.net>
Date: Sat, 27 Jul 2024 00:01:06 +0100
Subject: [PATCH] fix missing square bracket error in nxm broker

When attempting to download for a game in which no Mod Organizer 2
instance has been set up, the following error is emitted:

    line 18: [: missing `]'

This patch fixes the error by adding the required space character!
---
 handlers/modorganizer2-nxm-broker.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/handlers/modorganizer2-nxm-broker.sh b/handlers/modorganizer2-nxm-broker.sh
index 89de091..a695e0a 100755
--- a/handlers/modorganizer2-nxm-broker.sh
+++ b/handlers/modorganizer2-nxm-broker.sh
@@ -15,7 +15,7 @@ nexus_game_id=${nexus_game_id%%/*}
 instance_link="$HOME/.config/modorganizer2/instances/${nexus_game_id:?}"
 instance_dir=$(readlink -f  "$instance_link")
 if [ ! -d "$instance_dir" ]; then
-	[ -L "$instance_link"] && rm "$instance_link"
+	[ -L "$instance_link" ] && rm "$instance_link"
 
 	zenity --ok-label=Exit --error --text \
 		"Could not download file because there is no Mod Organizer 2 instance for '$nexus_game_id'"